diff --git a/.github/workflows/build.ci.yml b/.github/workflows/build.ci.yml index 118a9fd87b..b41048c79d 100644 --- a/.github/workflows/build.ci.yml +++ b/.github/workflows/build.ci.yml @@ -8,9 +8,6 @@ on: - stable pull_request: types: [labeled, opened, reopened, synchronize] -env: - JAVA_HOME: /opt/hostedtoolcache/GraalVM/21.0.0-2-java11-amd64/x64 - GRAALVM_HOME: /opt/hostedtoolcache/GraalVM/21.0.0-2-java11-amd64/x64 jobs: ## @@ -52,14 +49,15 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' ## Setup: GraalVM - - uses: elide-tools/setup-graalvm@5.0 + - uses: graalvm/setup-graalvm@v1 with: - graalvm: '21.0.0.2' - java: 'java11' - arch: 'amd64' + version: 'latest' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} ## Setup: Checkout Code - uses: actions/checkout@v3 @@ -127,14 +125,15 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' ## Setup: GraalVM - - uses: elide-tools/setup-graalvm@5.0 + - uses: graalvm/setup-graalvm@v1 with: - graalvm: '21.0.0.2' - java: 'java11' - arch: 'amd64' + version: 'latest' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} ## Prep: Download Caches - name: Cache dependencies @@ -203,14 +202,15 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' ## Setup: GraalVM - - uses: DeLaGuardo/setup-graalvm@5.0 + - uses: graalvm/setup-graalvm@v1 with: - graalvm: '21.0.0.2' - java: 'java11' - arch: 'amd64' + version: 'latest' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} ## Setup: `gu` components - name: Install native-image component @@ -269,14 +269,15 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' ## Setup: GraalVM - - uses: elide-tools/setup-graalvm@5.0 + - uses: graalvm/setup-graalvm@v1 with: - graalvm: '21.0.0.2' - java: 'java11' - arch: 'amd64' + version: 'latest' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} ## Setup: Checkout Code - name: Cache SonarCloud packages @@ -375,14 +376,15 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' ## Setup: GraalVM - - uses: DeLaGuardo/setup-graalvm@5.0 + - uses: graalvm/setup-graalvm@v1 with: - graalvm: '21.0.0.2' - java: 'java11' - arch: 'amd64' + version: 'latest' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} ## Setup: QEMU - name: Set up QEMU @@ -534,14 +536,15 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' ## Setup: GraalVM - - uses: DeLaGuardo/setup-graalvm@5.0 + - uses: graalvm/setup-graalvm@v1 with: - graalvm: '21.0.0.2' - java: 'java11' - arch: 'amd64' + version: 'latest' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} ## Setup: QEMU - name: Set up QEMU diff --git a/.github/workflows/codeql.ci.yml b/.github/workflows/codeql.ci.yml index 1a6ba8b7fe..14aac13de1 100644 --- a/.github/workflows/codeql.ci.yml +++ b/.github/workflows/codeql.ci.yml @@ -33,11 +33,11 @@ jobs: java-version: '11' ## Setup: GraalVM - - uses: DeLaGuardo/setup-graalvm@5.0 + - uses: graalvm/setup-graalvm@v1 with: - graalvm: '21.0.0.2' - java: 'java11' - arch: 'amd64' + version: '21.1.0' + java-version: '17' + components: 'native-image' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/build.gradle.kts b/build.gradle.kts index 97c5c12bb5..940b097ed0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,6 +32,8 @@ props.load(file(if (project.hasProperty("elide.ci") && project.properties["elide "local.properties" }).inputStream()) +val javaVersion = Versions.javaLanguage + tasks.dokkaHtmlMultiModule.configure { outputDirectory.set(buildDir.resolve("docs/kotlin/html")) } @@ -128,6 +130,10 @@ allprojects { maven("https://maven-central.storage-download.googleapis.com/maven2/") jcenter() } + tasks.withType().configureEach { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion + } tasks.withType().configureEach { kotlinOptions { apiVersion = Versions.kotlinLanguage diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index e4b0fddc3c..b229d892be 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -5,7 +5,7 @@ object Versions { const val kotlinLanguage = "1.7" const val kotlinSerialization = "1.3.3" const val kotlinxHtml = "0.7.5" - const val javaLanguage = "11" + const val javaLanguage = "17" const val kotest = "5.3.2" const val micronaut = "3.5.2" const val micronautPlugin = "3.4.1" diff --git a/gradle.properties b/gradle.properties index 97f53799c5..6b65c086f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ org.gradle.configureondemand=true org.gradle.jvmargs=-XX:MaxMetaspaceSize=768m ## Settings: Languages -versions.java.language=11 +versions.java.language=17 versions.kotlin.sdk=1.7.0 versions.kotlin.language=1.7 @@ -27,6 +27,9 @@ kotlin.code.style=official kotlin.js.compiler=both kotlin.js.generate.executable.default=false kotlin.parallel.tasks.in.project=true +kotlin.build.report.output=build_scan +kotlin.incremental=true +kotlin.incremental.useClasspathSnapshot=true kotlin.mpp.stability.nowarn=true kotlin.mpp.enableCInteropCommonization=true kotlin.mpp.enableCompatibilityMetadataVariant=true diff --git a/images/base/Dockerfile b/images/base/Dockerfile index fb9e5d366b..8f68722450 100644 --- a/images/base/Dockerfile +++ b/images/base/Dockerfile @@ -7,7 +7,7 @@ FROM --platform=linux/${UBUNTU_ARCH} ubuntu:${UBUNTU_VERSION} ARG GRAAL_EDITION=ce ARG GRAAL_VERSION=22.1.0 ARG GRAAL_ARCH=amd64 -ARG JAVA_VERSION=java11 +ARG JAVA_VERSION=java17 RUN apt-get update \ && apt-get -y upgrade \ diff --git a/images/builder/Dockerfile b/images/builder/Dockerfile index 7446e84e91..c4e2787424 100644 --- a/images/builder/Dockerfile +++ b/images/builder/Dockerfile @@ -4,7 +4,7 @@ ARG BASE_ARCH="amd64" FROM --platform=linux/${BASE_ARCH} us-docker.pkg.dev/elide-fw/tools/base${BASE_IMAGE} -ARG JDK_VERSION="11" +ARG JDK_VERSION="17" ARG NODE_VERSION="17" ARG YARN_VERSION="berry" ARG GRADLE_VERSION=7.4.2 @@ -193,7 +193,7 @@ RUN echo "Building Elide builder image..." \ ENV GRADLE_HOME="/opt/gradle" \ KOTLIN_HOME="/opt/kotlinc" \ - JAVA_HOME="/usr/lib/jvm/zulu11" \ + JAVA_HOME="/usr/lib/jvm/zulu17" \ GRAALVM_HOME="/usr/lib/gvm" \ GOPATH="/go" \ QTWEBENGINE_DISABLE_SANDBOX="1" \ diff --git a/packages/graalvm/build.gradle.kts b/packages/graalvm/build.gradle.kts index 56df1dcf1d..62fb3ead96 100644 --- a/packages/graalvm/build.gradle.kts +++ b/packages/graalvm/build.gradle.kts @@ -40,7 +40,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) vendor.set(JvmVendorSpec.GRAAL_VM) if (project.hasProperty("elide.graalvm.variant")) { val variant = project.property("elide.graalvm.variant") as String diff --git a/packages/rpc-jvm/build.gradle.kts b/packages/rpc-jvm/build.gradle.kts index 31c742c80b..9871c0af23 100644 --- a/packages/rpc-jvm/build.gradle.kts +++ b/packages/rpc-jvm/build.gradle.kts @@ -93,7 +93,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } diff --git a/packages/server/build.gradle.kts b/packages/server/build.gradle.kts index 1e34082af8..5a0c9a48d9 100644 --- a/packages/server/build.gradle.kts +++ b/packages/server/build.gradle.kts @@ -40,7 +40,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } diff --git a/packages/test/src/nativeMain/kotlin/.gitkeep b/packages/test/src/nativeMain/kotlin/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/test/src/nativeTest/kotlin/.gitkeep b/packages/test/src/nativeTest/kotlin/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/fullstack/basic/server/build.gradle.kts b/samples/fullstack/basic/server/build.gradle.kts index 9cb2bb38dd..626c44a788 100644 --- a/samples/fullstack/basic/server/build.gradle.kts +++ b/samples/fullstack/basic/server/build.gradle.kts @@ -23,7 +23,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } diff --git a/samples/fullstack/react-ssr/server/build.gradle.kts b/samples/fullstack/react-ssr/server/build.gradle.kts index 5d65455c55..a81896f78e 100644 --- a/samples/fullstack/react-ssr/server/build.gradle.kts +++ b/samples/fullstack/react-ssr/server/build.gradle.kts @@ -23,7 +23,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) vendor.set(JvmVendorSpec.GRAAL_VM) if (project.hasProperty("elide.graalvm.variant")) { val variant = project.property("elide.graalvm.variant") as String @@ -50,7 +50,7 @@ graalvmNative { )) javaLauncher.set(javaToolchains.launcherFor { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) if (project.hasProperty("elide.graalvm.variant")) { val variant = project.property("elide.graalvm.variant") as String if (variant != "COMMUNITY") { diff --git a/samples/fullstack/react/server/build.gradle.kts b/samples/fullstack/react/server/build.gradle.kts index 45d2a074cc..db4a9192bb 100644 --- a/samples/fullstack/react/server/build.gradle.kts +++ b/samples/fullstack/react/server/build.gradle.kts @@ -23,7 +23,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } diff --git a/samples/fullstack/ssr/server/build.gradle.kts b/samples/fullstack/ssr/server/build.gradle.kts index b7086b0d87..104bcec94c 100644 --- a/samples/fullstack/ssr/server/build.gradle.kts +++ b/samples/fullstack/ssr/server/build.gradle.kts @@ -23,7 +23,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } @@ -103,7 +103,7 @@ graalvmNative { )) javaLauncher.set(javaToolchains.launcherFor { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) if (project.hasProperty("elide.graalvm.variant")) { val variant = project.property("elide.graalvm.variant") as String if (variant != "COMMUNITY") { diff --git a/samples/server/hellocss/build.gradle.kts b/samples/server/hellocss/build.gradle.kts index 7a93a590f7..fd222a9279 100644 --- a/samples/server/hellocss/build.gradle.kts +++ b/samples/server/hellocss/build.gradle.kts @@ -22,7 +22,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } diff --git a/samples/server/helloworld/build.gradle.kts b/samples/server/helloworld/build.gradle.kts index 115497cb1e..169b4f061e 100644 --- a/samples/server/helloworld/build.gradle.kts +++ b/samples/server/helloworld/build.gradle.kts @@ -22,7 +22,7 @@ kotlin { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } }