Skip to content

Commit

Permalink
restore Java 11 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
xzel23 committed Nov 5, 2024
1 parent 387e9f9 commit 4c93444
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-jlink-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '11'
distribution: 'zulu'
- name: Gradle build
uses: gradle/gradle-build-action@v3
Expand All @@ -37,10 +37,10 @@ jobs:
if: "startsWith(github.event.head_commit.message, 'Release ')"
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '11'
distribution: 'zulu'
- name: Publish Gradle Plugins
uses: gradle/gradle-build-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '11'
distribution: 'zulu'
- name: Publish Gradle Plugins
uses: gradle/gradle-build-action@v3
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
id 'org.ajoberstar.git-publish' version '4.2.2'
}

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.toolchain.languageVersion = JavaLanguageVersion.of(11)

project.version.with {
major = pluginVersionMajor as int
Expand Down
2 changes: 1 addition & 1 deletion doc/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The plugin provides several tasks. The most frequently used are `jlink`, which c
and `jlinkZip`, which in addition creates a zip archive of the custom runtime image.
With the `jpackage` task you can create a platform-specific installer for your application.

WARNING: The current version of this plugin requires Java 17 and Gradle 7.4 or newer.
WARNING: The current version of this plugin requires Java 11 and Gradle 7.4 or newer.
While it might work with some combinations of older Java and Gradle versions, these are not officially supported.
If you are forced to work with an older Gradle release, you should use https://badass-jlink-plugin.beryx.org/releases/2.25.0/[the version 2.25.0] of this plugin.

Expand Down
2 changes: 1 addition & 1 deletion src/test/groovy/org/beryx/jlink/JavaVersionSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ class JavaVersionSpec extends Specification {
int version = JavaVersion.get(System.getenv('JAVA_HOME'))

then:
version == 17
version == 11
}
}
4 changes: 2 additions & 2 deletions src/test/resources/hello-bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ repositories {
mavenCentral()
}

sourceCompatibility = 17
targetCompatibility = 17
sourceCompatibility = 11
targetCompatibility = 11

dependencies {
// import a BOM
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/hello-log4j-2.19.0/build.additive.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ repositories {
mavenCentral()
}

sourceCompatibility = 17
targetCompatibility = 17
sourceCompatibility = 11
targetCompatibility = 11

ext.log4jVersion = '2.19.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ repositories {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

val log4jVersion = "2.19.0"
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/hello-log4j-2.19.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ repositories {
mavenCentral()
}

sourceCompatibility = 17
targetCompatibility = 17
sourceCompatibility = 11
targetCompatibility = 11

ext.log4jVersion = '2.19.0'

Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/local-deps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
group 'org.example'
version '1.0'

sourceCompatibility = 17
sourceCompatibility = 11

application {
mainClass = "org.example.Hello"
Expand Down

0 comments on commit 4c93444

Please sign in to comment.