Skip to content

Commit

Permalink
jdk21 support
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed May 27, 2024
1 parent 063cc79 commit 0a404c1
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
java-version: 21

- uses: Ortus-Solutions/commandbox-action@v1.0.2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
env:
MODULE_ID: bx-compat
SNAPSHOT: ${{ inputs.snapshot || false }}
JDK: 17
JDK: 21
GRADLE: 8.7
BUILD_ID: ${{ github.run_number }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
java-version: 21

- name: Format Java Source
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "windows-latest" ]
jdkVersion: [ "17" ]
jdkVersion: [ "21" ]
experimental: [false]
#include:
#- jdkVersion: "17"
Expand Down
1 change: 0 additions & 1 deletion box.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "BoxLang Compat Module",
"version": "@build.version@+@build.number@",
"unlisted": true,
"location": "https://downloads.ortussolutions.com/ortussolutions/boxlang-modules/bx-compat/@build.version@/bx-compat-@build.version@.zip",
"author": "Ortus Solutions",
"homepage": "https://github.com/ortus-boxlang/bx-compat",
Expand Down
14 changes: 6 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ plugins {
id "com.diffplug.spotless" version "6.25.0"
// https://github.com/harbby/gradle-serviceloader
id "com.github.harbby.gradle.serviceloader" version "1.1.8"
// https://github.com/johnrengelman/shadow
id 'com.github.johnrengelman.shadow' version '8.1.1'
// For building shadow jars with jdk 17 ONLY
//id 'com.github.johnrengelman.shadow' version '8.1.1'
// For building shadow jars using JDK 21 +, they had to fork
id "io.github.goooler.shadow" version "8.1.7"
// Download task
id "de.undercouch.download" version "5.6.0"
}

/**
* Project Properties
*/
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
ext {
buildID = System.getenv( 'BUILD_ID' ) ?: '0'
branch = System.getenv( 'BRANCH' ) ?: 'development'
Expand All @@ -38,19 +42,13 @@ dependencies {
}

java {
// See: https://docs.gradle.org/current/userguide/toolchains.html#toolchains
// This is to provide build consistency across developers and CI/CD
toolchain {
languageVersion = JavaLanguageVersion.of( project.properties[ "jdkVersion" ] )
}
// Produces a javadocs jar
withJavadocJar()
}

compileJava {
// Compiler Options
options.incremental = true
options.release = Integer.parseInt( project.properties[ "jdkVersion" ] )
options.encoding = 'UTF-8'
options.debug()
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
version=1.0.0
group=io.boxlang
boxlangVersion=1.0.0
jdkVersion=17
jdkVersion=21

0 comments on commit 0a404c1

Please sign in to comment.