Skip to content

Commit

Permalink
Up to 6.6.0 shared plugin to run tests on 21 (#217)
Browse files Browse the repository at this point in the history
* Up to 6.6.0 shared plugin to run tests on 21

* Use a toolchain for Kotlin and drop the magic add-opens

* Add magic properties back

* Run Ksp tests on 21?

* Unused import

* Next minor
  • Loading branch information
timyates authored Oct 20, 2023
1 parent ba03b30 commit 6e85bc1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
16 changes: 14 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion=2.1.1-SNAPSHOT
projectVersion=2.2.0-SNAPSHOT
projectGroup=io.micronaut.crac

title=Micronaut CRaC
Expand All @@ -7,8 +7,20 @@ projectUrl=https://micronaut.io
githubSlug=micronaut-projects/micronaut-crac
developers=Tim Yates,Sergio del Amo


# If needed, set additional properties

org.gradle.caching=true
org.gradle.jvmargs=-Xmx1g

# No matter which Java toolchain we use, the Kotlin Daemon is always invoked by the current JDK.
# Therefor to fix Kapt errors when running tests under Java 21, we need to open up some modules for the Kotlin Daemon.
kotlin.daemon.jvmargs=--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED\
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ managed-crac = "1.4.0"

micronaut-logging = "1.0.0"

testcontainers = "1.19.0"
testcontainers = "1.19.1"

[libraries]
# Core
Expand Down
6 changes: 2 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginManagement {
}

plugins {
id 'io.micronaut.build.shared.settings' version '6.5.7'
id 'io.micronaut.build.shared.settings' version '6.6.0'
}

enableFeaturePreview('TYPESAFE_PROJECT_ACCESSORS')
Expand All @@ -21,9 +21,7 @@ include 'test-suite-dbcp-jooq'
include 'test-suite-docker'
include 'test-suite-groovy'
include 'test-suite-hikari-jooq'
if (JavaVersion.current() < JavaVersion.VERSION_21) {
include 'test-suite-kotlin'
}
include 'test-suite-kotlin'
include 'test-suite-kotlin-ksp'
include 'test-suite-redis'

Expand Down
6 changes: 6 additions & 0 deletions test-suite-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ dependencies {
testImplementation(mnTest.micronaut.test.junit5)
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

0 comments on commit 6e85bc1

Please sign in to comment.