diff --git a/.editorconfig b/.editorconfig index c137328..a21cca2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/gordon-plugin/build.gradle.kts b/gordon-plugin/build.gradle.kts index 92f2477..3e5575e 100644 --- a/gordon-plugin/build.gradle.kts +++ b/gordon-plugin/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { `kotlin-dsl` @@ -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().configureEach { sourceCompatibility = "21" targetCompatibility = "21" } -tasks.withType().configureEach { - kotlinOptions { - jvmTarget = "21" - } -} - tasks.withType().configureEach { dependsOn(":test_app:assembleDebugAndroidTest") testLogging.exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL diff --git a/gordon-plugin/gradle.properties b/gordon-plugin/gradle.properties index b7fe065..92a9fda 100644 --- a/gordon-plugin/gradle.properties +++ b/gordon-plugin/gradle.properties @@ -1,2 +1,2 @@ group=com.banno.gordon -version=1.11.1 +version=1.12.0 diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/GordonTestTask.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/GordonTestTask.kt index c98f586..f9726c2 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/GordonTestTask.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/GordonTestTask.kt @@ -133,7 +133,7 @@ internal abstract class GordonTestTask @Inject constructor( } @TaskAction - private fun runTests() { + internal fun runTests() { runTestsCatching().fold({ throw it }, {}) } diff --git a/gradle.properties b/gradle.properties index af8b2fb..240cec5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7cf748e..e0fd020 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/gradlew b/gradlew index f5feea6..f3b75f3 100755 --- a/gradlew +++ b/gradlew @@ -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 diff --git a/test_app/build.gradle.kts b/test_app/build.gradle.kts index a601087..45261af 100644 --- a/test_app/build.gradle.kts +++ b/test_app/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id("com.android.application") kotlin("android") @@ -21,9 +23,6 @@ android { sourceCompatibility("21") targetCompatibility("21") } - kotlinOptions { - jvmTarget = "21" - } val debugSigningConfig = signingConfigs.register("debugSigningConfig") { storeFile = file("debug.keystore") storePassword = "bigbago" @@ -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") diff --git a/test_feature/build.gradle.kts b/test_feature/build.gradle.kts index 99aeb72..8fcfa93 100644 --- a/test_feature/build.gradle.kts +++ b/test_feature/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id("com.android.dynamic-feature") kotlin("android") @@ -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") } } diff --git a/test_library/build.gradle.kts b/test_library/build.gradle.kts index 49c1358..e8ecb54 100644 --- a/test_library/build.gradle.kts +++ b/test_library/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id("com.android.library") kotlin("android") @@ -17,9 +19,6 @@ android { sourceCompatibility("21") targetCompatibility("21") } - kotlinOptions { - jvmTarget = "21" - } flavorDimensions.add("foo") productFlavors { register("bar") { @@ -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")