Skip to content

Commit

Permalink
Bump target API level to 34 and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Jul 12, 2024
1 parent 8e6ad31 commit 6d75ffe
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 40 deletions.
39 changes: 20 additions & 19 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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}")
Expand Down Expand Up @@ -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")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class PreferenceFragment2

}

override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {

}

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
15 changes: 8 additions & 7 deletions buildSrc/src/main/java/ProjectConfig.kt
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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",
Expand All @@ -78,7 +79,7 @@ fun LibraryExtension.setupLibraryDefaults() {
)
}

packagingOptions {
fun Packaging.() {
resources.excludes += "DebugProbesKt.bin"
}
}
Expand Down
12 changes: 4 additions & 8 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
kotlin.code.style=official
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6d75ffe

Please sign in to comment.