Skip to content

Commit

Permalink
Update to Kotlin 2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Jul 9, 2024
1 parent b53f530 commit 2f64ffd
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 39 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ buildscript {
dependencies {
classpath(libs.gradlePlugin.android)
classpath(libs.gradlePlugin.kotlin)
classpath(libs.gradlePlugin.composeCompiler)
classpath(libs.gradlePlugin.mavenPublish)
classpath(libs.gradlePlugin.paparazzi)
classpath(libs.gradlePlugin.roborazzi)
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Projects.kt
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,5 @@ private fun Project.kotlin(action: KotlinJvmCompile.() -> Unit) {
}

private fun BaseExtension.lint(action: Lint.() -> Unit) {
(this as CommonExtension<*, *, *, *, *>).lint(action)
(this as CommonExtension<*, *, *, *, *, *>).lint(action)
}
4 changes: 1 addition & 3 deletions coil-compose-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ import coil.setupLibraryModule
plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.kotlin.plugin.compose")
}

setupLibraryModule(name = "coil.compose.base") {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
}

dependencies {
Expand Down
4 changes: 1 addition & 3 deletions coil-compose-singleton/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ import coil.setupLibraryModule
plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.kotlin.plugin.compose")
}

setupLibraryModule(name = "coil.compose.singleton") {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
}

dependencies {
Expand Down
4 changes: 1 addition & 3 deletions coil-sample-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import coil.setupAppModule
plugins {
id("com.android.application")
id("kotlin-android")
id("org.jetbrains.kotlin.plugin.compose")
}

setupAppModule(name = "sample.compose") {
Expand All @@ -27,9 +28,6 @@ setupAppModule(name = "sample.compose") {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
}

dependencies {
Expand Down
4 changes: 1 addition & 3 deletions coil-test-paparazzi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import coil.setupLibraryModule
plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.kotlin.plugin.compose")
id("app.cash.paparazzi")
}

setupLibraryModule(name = "coil.test.paparazzi") {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
}

dependencies {
Expand Down
4 changes: 1 addition & 3 deletions coil-test-roborazzi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import coil.setupLibraryModule
plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.kotlin.plugin.compose")
id("io.github.takahirom.roborazzi")
}

setupLibraryModule(name = "coil.test.roborazzi") {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
}

dependencies {
Expand Down
4 changes: 0 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ android.useAndroidX=true
# https://kotlinlang.org/docs/code-style-migration-guide.html#in-gradle
kotlin.code.style=official

# https://issuetracker.google.com/issues/311218673
#noinspection GradleDependency
android.experimental.lint.version=8.3.0-rc01

# Disable welcome message.
systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false

Expand Down
15 changes: 8 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
androidx-activity = "1.8.2"
androidx-lifecycle = "2.7.0"
compose = "1.6.1"
composeCompiler = "1.5.9"
coroutines = "1.7.3"
compose = "1.6.8"
coroutines = "1.8.1"
kotlin = "2.0.0"
ktlint = "1.0.1"
okhttp = "4.12.0"
okio = "3.8.0"
okio = "3.9.0"
roborazzi = "1.7.0"
perfetto = "1.0.0"
runtimeTracing = "1.0.0-beta01"
Expand All @@ -17,9 +17,10 @@ dokka = "org.jetbrains.dokka:1.9.10"
spotless = "com.diffplug.spotless:6.23.3"

[libraries]
gradlePlugin-android = "com.android.tools.build:gradle:8.2.2"
gradlePlugin-kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"
gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.26.0"
gradlePlugin-android = "com.android.tools.build:gradle:8.5.0"
gradlePlugin-composeCompiler = { module = "org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin", version.ref = "kotlin" }
gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.29.0"
gradlePlugin-paparazzi = "app.cash.paparazzi:paparazzi-gradle-plugin:1.3.1"
gradlePlugin-roborazzi = { module = "io.github.takahirom.roborazzi:roborazzi-gradle-plugin", version.ref = "roborazzi" }

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down

0 comments on commit 2f64ffd

Please sign in to comment.