Skip to content

Commit

Permalink
omnij-cli Module: require Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
msgilligan committed Sep 28, 2023
1 parent acdbbcd commit 0cea79e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
java-version: [ '17', '21' ]
java-version: [ '21' ]
distribution: [ 'graalvm-community' ]
fail-fast: false
name: ${{ matrix.os }} JDK ${{ matrix.java-version }}.${{ matrix.distribution }}
Expand Down
2 changes: 1 addition & 1 deletion omnij-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
ext.moduleName = 'foundation.omni.cli'

tasks.withType(JavaCompile).configureEach {
options.release = 17
options.release = 21
}

configurations {
Expand Down
10 changes: 8 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ include 'omnij-rest-client-jdk' // JDK Omni REST client (using java.net.h
include 'omnij-rpc' // Omni JSON-RPC + Groovy + Integration tests

if (JavaVersion.current().compareTo(JavaVersion.VERSION_17) >= 0) {
System.err.println "Including JDK 17 modules because Java ${JavaVersion.current()} is JDK 17+"
include 'omnij-cli'
System.err.println "Including JDK 17 modules because Java is ${JavaVersion.current()}"
include 'omnij-tx-records'
} else {
System.err.println "Skipping JDK 17 subprojects, requires Java 17+, currently running Java ${JavaVersion.current()}"
}

if (JavaVersion.current().compareTo(JavaVersion.VERSION_21) >= 0) {
System.err.println "Including JDK 21 modules because Java is ${JavaVersion.current()}"
include 'omnij-cli'
} else {
System.err.println "Skipping JDK 21 modules, currently running Java ${JavaVersion.current()}"
}

0 comments on commit 0cea79e

Please sign in to comment.