Skip to content

Commit

Permalink
Bump Java 21 as build requirement (#519)
Browse files Browse the repository at this point in the history

Signed-off-by: Paolo Di Tommaso <[email protected]>
Co-authored-by: Munish Chouhan <[email protected]>
  • Loading branch information
pditommaso and munishchouhan authored Nov 9, 2024
1 parent 2450cef commit 132f949
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java_version: [19]
java_version: [21]

steps:
- name: Environment
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ images.
* Push and cache built containers to a user-provided container repository;
* Build Singularity native containers both using a Singularity spec file, Conda package(s);
* Push Singularity native container images to OCI-compliant registries;

* Scan container images for security vulnerabilities

### How it works

Expand All @@ -34,7 +34,7 @@ container registry where the image is stored, while the instrumented layers are

### Requirements

* Java 19 or later
* Java 21 or later
* Linux or macOS
* Redis 6.2 (or later)
* Docker engine (for development)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,3 @@ plugins {
}

group = 'io.seqera'

tasks.withType(Test).configureEach {
// note: "--enable-preview" is required to use virtual thread on Java 19 and 20
jvmArgs(["--enable-preview"])
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ repositories {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(19)
languageVersion = JavaLanguageVersion.of(21)
}
}

compileJava {
options.release.set(11)
options.release.set(17)
}

tasks.withType(GroovyCompile).configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ repositories {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(19)
languageVersion = JavaLanguageVersion.of(21)
}
}

compileJava {
options.release.set(11)
options.release.set(17)
}

tasks.withType(GroovyCompile).configureEach {
Expand Down Expand Up @@ -55,7 +55,6 @@ dependencies {

tasks.withType(Test).configureEach {
jvmArgs([
'--enable-preview',
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.nio=ALL-UNNAMED',
Expand Down
7 changes: 7 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
plugins {
// required to download the toolchain (jdk) from a remote repository
// https://github.com/gradle/foojay-toolchains
// https://docs.gradle.org/current/userguide/toolchains.html#sub:download_repositories
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
}

rootProject.name="wave"

// only for development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ValidationServiceImpl implements ValidationService {
new URI(endpoint)
}
catch (URISyntaxException e) {
return "Invalid endpoint '${endpoint}' — cause: ${e.message}"
return "Invalid endpoint '${endpoint}' — cause: ${e.getMessage()}"
}

return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ValidationServiceProdTest extends Specification {
ENDPOINT | EXPECTED
'foo' | "Missing endpoint protocol — offending value: foo"
'ftp://foo.com' | "Invalid endpoint protocol — offending value: ftp://foo.com"
'http://a b c' | "Invalid endpoint 'http://a b c' — cause: Illegal character in authority at index 7: http://a b c"
'http://a b c' | "Invalid endpoint 'http://a b c' — cause: Illegal character in authority at index 8: http://a b c"
'http://localhost' | 'Endpoint hostname not allowed — offending value: http://localhost'
'http://localhost:8000' | 'Endpoint hostname not allowed — offending value: http://localhost:8000'
'http://10.0.0.0/api' | 'Endpoint hostname not allowed — offending value: http://10.0.0.0/api'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ValidationServiceTest extends Specification {
ENDPOINT | EXPECTED
'foo' | "Missing endpoint protocol — offending value: foo"
'ftp://foo.com' | "Invalid endpoint protocol — offending value: ftp://foo.com"
'http://a b c' | "Invalid endpoint 'http://a b c' — cause: Illegal character in authority at index 7: http://a b c"
'http://a b c' | "Invalid endpoint 'http://a b c' — cause: Illegal character in authority at index 8: http://a b c"
and:
'http://foo.com' | null
'http://localhost' | null
Expand Down

0 comments on commit 132f949

Please sign in to comment.