mirror of
https://github.com/MatomoCamp/matomocamp-companion-android.git
synced 2024-09-19 16:13:46 +02:00
7b4dd70b41
change compile and target SDK version to 32
137 lines
4.7 KiB
Groovy
137 lines
4.7 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'kotlin-android'
|
|
id 'kotlin-parcelize'
|
|
id 'kotlin-kapt'
|
|
id 'dagger.hilt.android.plugin'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 32
|
|
buildToolsVersion "32.0.0"
|
|
|
|
defaultConfig {
|
|
applicationId "be.digitalia.fosdem"
|
|
minSdkVersion 19
|
|
targetSdkVersion 32
|
|
multiDexEnabled = true
|
|
versionCode 1900210
|
|
versionName "2.1.0"
|
|
// Supported languages
|
|
resConfigs "en"
|
|
vectorDrawables.useSupportLibrary = true
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
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 {
|
|
resources.excludes += [
|
|
'androidsupportmultidexversion.txt',
|
|
'DebugProbesKt.bin',
|
|
'kotlin-tooling-metadata.json'
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
coreLibraryDesugaringEnabled true
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
freeCompilerArgs = [
|
|
'-opt-in=kotlin.RequiresOptIn'
|
|
]
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
packagingOptions {
|
|
resources.excludes += [
|
|
'kotlin/**',
|
|
'META-INF/*.kotlin_module',
|
|
'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.5.1"
|
|
def room_version = "2.4.3"
|
|
def okhttp_version = "3.12.13"
|
|
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8'
|
|
|
|
implementation "androidx.multidex:multidex:2.0.1"
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
kapt "com.google.dagger:hilt-compiler:$hilt_version"
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
|
|
implementation 'androidx.core:core-ktx:1.8.0'
|
|
implementation 'androidx.activity:activity-ktx:1.5.1'
|
|
implementation 'androidx.fragment:fragment-ktx:1.5.2'
|
|
implementation 'androidx.appcompat:appcompat:1.5.0'
|
|
implementation 'com.google.android.material:material:1.6.1'
|
|
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.1'
|
|
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.2.0'
|
|
implementation 'com.squareup.moshi:moshi:1.13.0'
|
|
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
|
}
|