1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00
matomocamp-companion-android/app/build.gradle

134 lines
4.6 KiB
Groovy
Raw Normal View History

plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}
android {
compileSdkVersion 31
buildToolsVersion "31.0.0"
defaultConfig {
applicationId "be.digitalia.fosdem"
minSdkVersion 19
targetSdkVersion 31
multiDexEnabled = true
2021-02-06 01:39:43 +01:00
versionCode 1700205
versionName "2.0.5"
// Supported languages
resConfigs "en"
vectorDrawables.useSupportLibrary = true
}
sourceSets {
main {
2020-12-25 17:26:12 +01:00
res.srcDirs += 'src/main/res-override'
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles 'proguard-defaults.txt', 'proguard-rules.pro'
kotlinOptions {
freeCompilerArgs = [
'-Xno-param-assertions',
'-Xno-call-assertions',
'-Xno-receiver-assertions'
]
}
packagingOptions {
exclude 'androidsupportmultidexversion.txt'
exclude 'DebugProbesKt.bin'
exclude 'kotlin-tooling-metadata.json'
}
}
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
freeCompilerArgs = [
'-Xopt-in=kotlin.RequiresOptIn'
]
jvmTarget = "1.8"
}
packagingOptions {
exclude 'kotlin/**'
exclude 'META-INF/*.kotlin_module'
exclude 'META-INF/*.version'
}
}
afterEvaluate {
// Update configuration of the R8 tasks to optimize desugaring shrinker
def originalSetting = "\"support_all_callbacks_from_library\": true"
def replacementSetting = "\"support_all_callbacks_from_library\": false"
tasks.forEach { task ->
def taskSimpleName = task.getClass().getSimpleName()
if (taskSimpleName.startsWith("R8Task")) {
task.configure {
def patchedDesugarConfig = coreLibDesugarConfig.getProvider().map {
it.replace(originalSetting, replacementSetting)
}
coreLibDesugarConfig.set(patchedDesugarConfig)
}
} else if (taskSimpleName.startsWith("L8DexDesugarLibTask")) {
task.configure {
def patchedDesugarConfig = libConfiguration.getProvider().map {
it.replace(originalSetting, replacementSetting)
}
libConfiguration.set(patchedDesugarConfig)
}
}
}
}
dependencies {
def lifecycle_version = "2.4.0"
def room_version = "2.4.1"
2021-02-06 01:36:25 +01:00
def okhttp_version = "3.12.13"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
2021-11-06 19:31:02 +01:00
implementation "androidx.multidex:multidex:2.0.1"
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-compiler:$hilt_version"
2021-12-26 15:56:37 +01:00
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.activity:activity-ktx:1.4.0'
implementation 'androidx.fragment:fragment-ktx:1.4.1'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.browser:browser:1.4.0'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation 'androidx.paging:paging-runtime:3.1.0'
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.room:room-paging:$room_version"
implementation "androidx.datastore:datastore-preferences:1.0.0"
kapt "androidx.room:room-compiler:$room_version"
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation("com.squareup.okhttp3:okhttp-tls:$okhttp_version") {
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
}
implementation 'com.squareup.okio:okio:3.0.0'
implementation 'com.squareup.moshi:moshi:1.13.0'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
}