Skip to content

Commit

Permalink
Merge pull request #133 from Banno/updates
Browse files Browse the repository at this point in the history
Update to Kotlin 2.1.0
  • Loading branch information
joshschriever authored Jan 9, 2025
2 parents 77f6d40 + 09a6632 commit 053178b
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 24 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ktlint_standard_annotation = disabled
ktlint_standard_class-signature = disabled
ktlint_standard_comment-spacing = disabled
ktlint_standard_condition-wrapping = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_multiline-if-else = disabled
ktlint_standard_spacing-between-declarations-with-annotations = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
Expand Down
15 changes: 8 additions & 7 deletions gordon-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
`kotlin-dsl`
Expand Down Expand Up @@ -27,17 +27,18 @@ dependencies {
testImplementation("io.mockk:mockk:1.12.0")
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
freeCompilerArgs.add("-Xconsistent-data-class-copy-visibility")
}
}

tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = "21"
targetCompatibility = "21"
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "21"
}
}

tasks.withType<Test>().configureEach {
dependsOn(":test_app:assembleDebugAndroidTest")
testLogging.exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
Expand Down
2 changes: 1 addition & 1 deletion gordon-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
group=com.banno.gordon
version=1.11.1
version=1.12.0
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ internal abstract class GordonTestTask @Inject constructor(
}

@TaskAction
private fun runTests() {
internal fun runTests() {
runTestsCatching().fold({ throw it }, {})
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
androidGradlePluginVersion=8.7.2
aapt2Version=8.7.2-12006047
kotlinVersion=1.9.25
kotlinterVersion=4.4.1
androidGradlePluginVersion=8.7.3
aapt2Version=8.7.3-12006047
kotlinVersion=2.1.0
kotlinterVersion=5.0.1
gradlePluginPublishVersion=1.3.0
org.gradle.caching=true
org.gradle.configuration-cache=true
Expand Down
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.11-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
12 changes: 9 additions & 3 deletions test_app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.application")
kotlin("android")
Expand All @@ -21,9 +23,6 @@ android {
sourceCompatibility("21")
targetCompatibility("21")
}
kotlinOptions {
jvmTarget = "21"
}
val debugSigningConfig = signingConfigs.register("debugSigningConfig") {
storeFile = file("debug.keystore")
storePassword = "bigbago"
Expand All @@ -38,6 +37,13 @@ android {
)
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
freeCompilerArgs.add("-Xconsistent-data-class-copy-visibility")
}
}

dependencies {
implementation("androidx.appcompat:appcompat:1.4.1")
androidTestImplementation("androidx.test:runner:1.4.0")
Expand Down
10 changes: 8 additions & 2 deletions test_feature/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.dynamic-feature")
kotlin("android")
Expand All @@ -17,8 +19,12 @@ android {
sourceCompatibility("21")
targetCompatibility("21")
}
kotlinOptions {
jvmTarget = "21"
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
freeCompilerArgs.add("-Xconsistent-data-class-copy-visibility")
}
}

Expand Down
12 changes: 9 additions & 3 deletions test_library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.library")
kotlin("android")
Expand All @@ -17,9 +19,6 @@ android {
sourceCompatibility("21")
targetCompatibility("21")
}
kotlinOptions {
jvmTarget = "21"
}
flavorDimensions.add("foo")
productFlavors {
register("bar") {
Expand All @@ -32,6 +31,13 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
freeCompilerArgs.add("-Xconsistent-data-class-copy-visibility")
}
}

dependencies {
implementation("androidx.appcompat:appcompat:1.4.1")
androidTestImplementation("androidx.test:runner:1.4.0")
Expand Down

0 comments on commit 053178b

Please sign in to comment.