Skip to content

Commit

Permalink
Upgrade build to support shared multiplatform Kotlin libs (#2181)
Browse files Browse the repository at this point in the history
* Upgrade Gradle wrapper to 8.5

* Upgrade Kotlin and Hilt

* Upgrade build plugin

* Fix kt 1.9 deprecations

* Upgrade Room

* Workaround Kotlin + Hilt 1.9

* Required upgrade of androidCompileSdk

* Add comment

* Remove broken clean task

* Fix build file syntax

* Move shared Gradle var up one level
  • Loading branch information
gino-m authored Jan 13, 2024
1 parent 1b5f593 commit 11bf2c0
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 149 deletions.
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@

buildscript {
ext {
hiltVersion = "2.45"
kotlinVersion = "1.8.10"
// As of Gradle 8.5, Kotlin plugin only tested up to 1.9.20.
kotlinVersion = "1.9.20"
hiltVersion = "2.50"
navigationVersion = "2.5.3"
roomVersion = "2.6.1"
}
repositories {
google()
Expand All @@ -33,7 +35,7 @@ buildscript {
}
dependencies {
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
classpath 'com.android.tools.build:gradle:8.1.0'
classpath 'com.android.tools.build:gradle:8.2.0'
classpath 'com.google.gms:google-services:4.3.15'
classpath "com.pascalwelsch.gitversioner:gitversioner:0.5.0"

Expand Down Expand Up @@ -99,9 +101,7 @@ task checkCode(type: GradleBuild) {
tasks = ['checkstyle', 'lintLocalDebug', 'ktfmtCheck', 'detekt']
}

task clean(type: Delete) {
delete rootProject.buildDir
}
// TODO(#2183): Add task to remove files in `build` on clean.

// https://github.com/passsy/gradle-gitVersioner-plugin
apply plugin: "com.pascalwelsch.gitversioner"
Expand Down Expand Up @@ -133,7 +133,7 @@ tasks.dependencyUpdates {
}

ext {
androidCompileSdk = 33
androidCompileSdk = 34
androidMinSdk = 24
androidTargetSdk = 30

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 3 additions & 4 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#Wed Jun 17 16:29:45 BST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
# "To use Gradle toolchain support, use the Android Gradle plugin (AGP) version 8.1.0-alpha09 or higher."
# https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
Loading

0 comments on commit 11bf2c0

Please sign in to comment.