Skip to content

Commit

Permalink
chore: upgrade kotlin to 1.9.23 (#2767)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorhugods authored Apr 2, 2024
1 parent e3ed13b commit f71d13e
Show file tree
Hide file tree
Showing 10 changed files with 1,033 additions and 215 deletions.
7 changes: 4 additions & 3 deletions app/src/main/kotlin/com/wire/android/WireApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ class WireApplication : Application(), Configuration.Provider {
@Inject
@ApplicationScope
lateinit var globalAppScope: CoroutineScope
override fun getWorkManagerConfiguration(): Configuration {
return Configuration.Builder()

override val workManagerConfiguration: Configuration
get() = Configuration.Builder()
.setWorkerFactory(wireWorkerFactory.get())
.setMinimumLoggingLevel(android.util.Log.DEBUG)
.build()
}

override fun onCreate() {
super.onCreate()
Expand Down Expand Up @@ -183,6 +183,7 @@ class WireApplication : Application(), Configuration.Provider {
values().firstOrNull { it.level == value } ?: TRIM_MEMORY_UNKNOWN
}
}

private const val TAG = "WireApplication"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import findVersion
import org.gradle.api.Project

internal fun Project.configureCompose(
commonExtension: CommonExtension<*, *, *, *, *>,
commonExtension: CommonExtension<*, *, *, *, *>, // Add another `*` when upgrading AGP to 8.3
): Unit = with(commonExtension) {
buildFeatures {
compose = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import versionCatalog

internal fun Project.configureKotlinAndroid(
commonExtension: CommonExtension<*, *, *, *, *>,
commonExtension: CommonExtension<*, *, *, *, *>, // Add another `*` when upgrading AGP to 8.3
): Unit = with(commonExtension) {
compileSdk = AndroidSdk.compile

Expand Down Expand Up @@ -85,6 +85,7 @@ private fun Project.configureKotlin() {
}
}

// Add another `*` when upgrading AGP to 8.3
internal fun CommonExtension<*, *, *, *, *>.configureAndroidKotlinTests() {
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down
30 changes: 9 additions & 21 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@
* along with this program. If not, see http://www.gnu.org/licenses/.
*/

private object Dependencies {
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0"
const val detektGradlePlugin = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.0"
const val koverGradlePlugin = "org.jetbrains.kotlinx:kover-gradle-plugin:0.7.5"
const val junit = "junit:junit:4.13.2"
const val kluent = "org.amshove.kluent:kluent:1.73"
const val spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.1.2"
const val junit5 = "de.mannodermaus.gradle.plugins:android-junit5:1.9.3.0"
const val grgit = "org.ajoberstar.grgit:grgit-core:5.2.0"
const val javapoet = "com.squareup:javapoet:1.13.0"
}

plugins {
`kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
Expand All @@ -43,14 +31,14 @@ repositories {

dependencies {
implementation("com.android.tools.build:gradle:${klibs.versions.agp.get()}")
implementation(Dependencies.kotlinGradlePlugin)
implementation(Dependencies.detektGradlePlugin)
implementation(Dependencies.koverGradlePlugin)
implementation(Dependencies.spotless)
implementation(Dependencies.junit5)
implementation(libs.kotlin.gradlePlugin)
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${klibs.versions.detekt.get()}")
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:${klibs.versions.kover.get()}")
implementation(libs.spotless.gradlePlugin)
implementation(libs.android.junit5)

testImplementation(Dependencies.junit)
testImplementation(Dependencies.kluent)
implementation(Dependencies.grgit)
implementation(Dependencies.javapoet) // https://github.com/google/dagger/issues/3068
testImplementation("junit:junit:${libs.versions.junit4.get()}")
testImplementation("org.amshove.kluent:kluent:${libs.versions.kluent.get()}")
implementation(libs.grgit.core)
implementation(libs.squareup.javapoet) // https://github.com/google/dagger/issues/3068
}
3 changes: 3 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ dependencyResolutionManagement {
create("klibs") {
from(files("../kalium/gradle/libs.versions.toml"))
}
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
6 changes: 4 additions & 2 deletions buildSrc/src/main/kotlin/scripts/quality.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package scripts

import findVersion
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask

Expand All @@ -28,10 +29,11 @@ plugins {
}

dependencies {
val detektVersion = "1.19.0"
val detektVersion = findVersion("detekt").requiredVersion
detekt("io.gitlab.arturbosch.detekt:detekt-cli:$detektVersion")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion")
detektPlugins("com.wire:detekt-rules:1.0.0-SNAPSHOT") {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-rules-libraries:$detektVersion")
detektPlugins("com.wire:detekt-rules:1.0.0-1.23.6") {
isChanging = true
}
}
Expand Down
Loading

0 comments on commit f71d13e

Please sign in to comment.