diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5099e91a..cf007aac 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -108,12 +108,12 @@ android { compileOptions { isCoreLibraryDesugaringEnabled = true - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = "17" freeCompilerArgs = freeCompilerArgs + listOf( "-Xopt-in=kotlin.ExperimentalStdlibApi", "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi", @@ -147,7 +147,7 @@ android { dependencies { // https://developer.android.com/studio/write/java8-support - coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5") + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4") implementation("org.jetbrains.kotlin:kotlin-stdlib:${Versions.Kotlin.core}") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.Kotlin.coroutines}") @@ -175,34 +175,35 @@ dependencies { androidTestImplementation("com.google.dagger:hilt-android-testing:${Versions.Dagger.core}") kaptAndroidTest("com.google.dagger:hilt-android-compiler:${Versions.Dagger.core}") - implementation("com.squareup.moshi:moshi:${Versions.Moshi.core}") - implementation("com.squareup.moshi:moshi-adapters:${Versions.Moshi.core}") - kapt("com.squareup.moshi:moshi-kotlin-codegen:${Versions.Moshi.core}") + val moshiVersion = "1.15.1" + implementation("com.squareup.moshi:moshi:$moshiVersion") + implementation("com.squareup.moshi:moshi-adapters:$moshiVersion") + kapt("com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion") implementation("com.squareup.okio:okio:3.1.0") - implementation("io.coil-kt:coil:2.0.0-rc02") + implementation("io.coil-kt:coil:2.4.0") - "gplayImplementation"("com.android.billingclient:billing:6.0.1") + "gplayImplementation"("com.android.billingclient:billing:6.2.1") // Support libs - implementation("androidx.core:core-ktx:1.8.0") - implementation("androidx.appcompat:appcompat:1.4.2") - implementation("androidx.annotation:annotation:1.4.0") + implementation("androidx.core:core-ktx:1.13.1") + implementation("androidx.appcompat:appcompat:1.7.0") + implementation("androidx.annotation:annotation:1.8.0") - implementation("androidx.activity:activity-ktx:1.5.0") - implementation("androidx.fragment:fragment-ktx:1.5.0") + implementation("androidx.activity:activity-ktx:1.9.0") + implementation("androidx.fragment:fragment-ktx:1.8.1") - implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0") - implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.0") - implementation("androidx.lifecycle:lifecycle-process:2.5.0") - implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.0") + implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3") + implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.3") + implementation("androidx.lifecycle:lifecycle-process:2.8.3") + implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.3") implementation("androidx.navigation:navigation-fragment-ktx:${Versions.AndroidX.Navigation.core}") implementation("androidx.navigation:navigation-ui-ktx:${Versions.AndroidX.Navigation.core}") androidTestImplementation("androidx.navigation:navigation-testing:${Versions.AndroidX.Navigation.core}") - implementation("androidx.preference:preference-ktx:1.2.0") + implementation("androidx.preference:preference-ktx:1.2.1") implementation("androidx.core:core-splashscreen:1.0.0-alpha02") diff --git a/app/src/main/java/eu/darken/myperm/common/uix/PreferenceFragment2.kt b/app/src/main/java/eu/darken/myperm/common/uix/PreferenceFragment2.kt index 8a2c9670..a7d6099a 100644 --- a/app/src/main/java/eu/darken/myperm/common/uix/PreferenceFragment2.kt +++ b/app/src/main/java/eu/darken/myperm/common/uix/PreferenceFragment2.kt @@ -54,7 +54,7 @@ abstract class PreferenceFragment2 } - override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) { + override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) { } diff --git a/build.gradle.kts b/build.gradle.kts index 93f2e71c..a4e1d3f8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ buildscript { mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:7.4.2") + classpath("com.android.tools.build:gradle:8.4.2") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.Kotlin.core}") classpath("com.google.dagger:hilt-android-gradle-plugin:${Versions.Dagger.core}") classpath("androidx.navigation:navigation-safe-args-gradle-plugin:${Versions.AndroidX.Navigation.core}") diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 9f64e411..cf0eed9e 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -8,7 +8,7 @@ repositories { mavenCentral() } dependencies { - implementation("com.android.tools.build:gradle:7.4.2") - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10") + implementation("com.android.tools.build:gradle:8.4.2") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24") implementation("com.squareup:javapoet:1.13.0") } \ No newline at end of file diff --git a/buildSrc/src/main/java/ProjectConfig.kt b/buildSrc/src/main/java/ProjectConfig.kt index d7efb8e9..0f25cef2 100644 --- a/buildSrc/src/main/java/ProjectConfig.kt +++ b/buildSrc/src/main/java/ProjectConfig.kt @@ -1,15 +1,16 @@ +import com.android.build.api.dsl.Packaging import com.android.build.gradle.LibraryExtension import org.gradle.api.Action import org.gradle.api.JavaVersion import java.io.File import java.io.FileInputStream import java.time.Instant -import java.util.* +import java.util.Properties object ProjectConfig { const val minSdk = 21 - const val compileSdk = 33 - const val targetSdk = 33 + const val compileSdk = 34 + const val targetSdk = 34 object Version { val versionProperties = Properties().apply { @@ -64,12 +65,12 @@ fun LibraryExtension.setupLibraryDefaults() { compileOptions { isCoreLibraryDesugaringEnabled = true - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = "17" freeCompilerArgs = freeCompilerArgs + listOf( "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi", "-Xuse-experimental=kotlinx.coroutines.FlowPreview", @@ -78,7 +79,7 @@ fun LibraryExtension.setupLibraryDefaults() { ) } - packagingOptions { + fun Packaging.() { resources.excludes += "DebugProbesKt.bin" } } diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index b4a580e9..a02c7fae 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -1,22 +1,18 @@ object Versions { object Kotlin { - const val core = "1.6.10" - const val coroutines = "1.6.0" + const val core = "1.9.24" + const val coroutines = "1.8.0" } object Dagger { - const val core = "2.39.1" - } - - object Moshi { - const val core = "1.13.0" + const val core = "2.51.1" } object AndroidX { const val core = "" object Navigation { - const val core = "2.5.0" + const val core = "2.7.7" } object WorkManager { diff --git a/gradle.properties b/gradle.properties index 25217527..dced6000 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,4 +16,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 04ad39b6..bf074d49 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Jul 13 14:45:28 CEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME