Skip to content

Commit 75bb885

Browse files
authored
Merge branch 'master' into dependabot/gradle/org.ajoberstar.git-publish-5.1.1
2 parents f6af8c1 + ca426ba commit 75bb885

File tree

11 files changed

+98
-34
lines changed

11 files changed

+98
-34
lines changed

.github/workflows/build-jlink-plugin.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,23 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ubuntu-latest, windows-latest, macOS-latest]
12+
os: [ubuntu-latest, windows-latest, macos-latest]
1313
steps:
1414
- uses: actions/checkout@v5
15-
- name: Set up JDK 17
15+
- name: Set up additional JDK 25 (Temurin)
16+
uses: actions/setup-java@v5
17+
with:
18+
java-version: '25'
19+
distribution: 'temurin'
20+
- name: Set up JDK 17 (default)
1621
uses: actions/setup-java@v5
1722
with:
1823
java-version: '17'
1924
distribution: 'zulu'
20-
- name: Gradle build
21-
uses: gradle/gradle-build-action@v3
22-
with:
23-
arguments: build asciidoc --scan
25+
- name: Setup Gradle
26+
uses: gradle/actions/setup-gradle@v4
27+
- name: Build and run asciidoc
28+
run: ./gradlew build asciidoc --scan
2429
- name: Run publish if necessary
2530
if: runner.os == 'Linux' && github.ref == 'refs/heads/master' && github.event_name == 'push'
2631
env:
@@ -42,11 +47,7 @@ jobs:
4247
with:
4348
java-version: '17'
4449
distribution: 'zulu'
50+
- name: Setup Gradle
51+
uses: gradle/actions/setup-gradle@v4
4552
- name: Publish Gradle Plugins
46-
uses: gradle/gradle-build-action@v3
47-
with:
48-
arguments: |
49-
assemble
50-
publishPlugins
51-
-Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
52-
-Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
53+
run: ./gradlew assemble publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}

.github/workflows/publish-plugin.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ jobs:
1212
with:
1313
java-version: '17'
1414
distribution: 'zulu'
15+
- name: Setup Gradle
16+
uses: gradle/actions/setup-gradle@v4
1517
- name: Publish Gradle Plugins
16-
uses: gradle/gradle-build-action@v3
17-
with:
18-
arguments: |
19-
assemble
20-
publishPlugins
21-
-Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
22-
-Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
18+
run: ./gradlew assemble publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ import org.kohsuke.github.GitHub
33

44
buildscript {
55
dependencies {
6-
classpath 'org.kohsuke:github-api:1.329'
6+
classpath 'org.kohsuke:github-api:1.330'
77
}
88
}
99

1010
plugins {
1111
id 'groovy'
1212
id 'com.github.johnrengelman.shadow' version '8.1.1'
13-
id 'com.gradle.plugin-publish' version '1.3.1'
13+
id 'com.gradle.plugin-publish' version '2.0.0'
1414
id 'com.github.ethankhall.semantic-versioning' version '1.1.0'
15-
id 'com.github.ben-manes.versions' version '0.52.0'
15+
id 'com.github.ben-manes.versions' version '0.53.0'
1616
id 'com.github.hierynomus.license' version '0.16.1'
1717
id 'org.asciidoctor.jvm.convert' version '4.0.5'
1818
}
@@ -48,7 +48,7 @@ repositories {
4848
}
4949

5050
dependencies {
51-
implementation 'org.ow2.asm:asm:9.8'
51+
implementation 'org.ow2.asm:asm:9.9'
5252

5353
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
5454

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
pluginVersionMajor = 3
2-
pluginVersionMinor = 1
3-
pluginVersionPatch = 4
4-
pluginVersionLabel = SNAPSHOT
5-
pluginReleaseBuild = false
1+
pluginVersionMajor = 3
2+
pluginVersionMinor = 1
3+
pluginVersionPatch = 4
4+
#pluginVersionLabel =
5+
pluginReleaseBuild = true

src/main/groovy/org/beryx/jlink/impl/JlinkTaskImpl.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ class JlinkTaskImpl extends BaseTaskImpl<JlinkTaskData> {
7777
@CompileDynamic
7878
void runJlink(File imageDir, String jdkHome, List<String> extraModulePaths, List<String> options) {
7979
if(!new File("$jdkHome/jmods/java.base.jmod").file) {
80-
throw new GradleException("java.base module not found in $jdkHome${File.separator}jmods")
80+
if (JavaVersion.get(jdkHome) < 24) {
81+
throw new GradleException("java.base module not found in $jdkHome${File.separator}jmods")
82+
} else {
83+
LOGGER.warn("java.base module not found in $jdkHome${File.separator}jmods, assuming the used Java toolchain has enabled JEP 493")
84+
}
8185
}
8286
project.delete(imageDir)
8387
def result = {

src/test/groovy/org/beryx/jlink/JlinkPluginSpec.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,10 @@ class JlinkPluginSpec extends Specification {
153153
imageZipFile.exists()
154154

155155
where:
156-
projectDir | gradleVersion | imageDir | imageZip | expectedLauncherName
157-
'hello-javafx' | '7.4' | 'helloFX' | 'helloFX.zip' | 'helloFX'
158-
'hello-javafx-log4j-2.11.1' | '7.6' | 'image' | 'image.zip' | 'helloFX'
156+
projectDir | gradleVersion | imageDir | imageZip | expectedLauncherName
157+
'hello-javafx' | '7.4' | 'helloFX' | 'helloFX.zip' | 'helloFX'
158+
'hello-javafx-log4j-2.11.1' | '7.6' | 'image' | 'image.zip' | 'helloFX'
159+
'hello-javafx-jep493' | '9.1.0' | 'helloFXJep493' | 'helloFXJep493.zip' | 'helloFXJep493'
159160
}
160161

161162
def "should adjust qualified opens in module-info"() {
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
plugins {
2+
id 'application'
3+
id 'org.openjfx.javafxplugin' version '0.1.0'
4+
id 'org.beryx.jlink'
5+
}
6+
7+
repositories {
8+
mavenCentral()
9+
}
10+
11+
java {
12+
toolchain {
13+
// Use Temurin (Adoptium) JDK 25 for the build
14+
languageVersion = JavaLanguageVersion.of(25)
15+
}
16+
}
17+
18+
javafx {
19+
modules = ['javafx.controls']
20+
}
21+
22+
application {
23+
mainClass = "org.example.HelloFXJpe493"
24+
}
25+
26+
jlink {
27+
imageName = 'helloFXJep493'
28+
imageDir = file('foo') // ignored
29+
imageZip = file('bar.zip') // ignored
30+
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
31+
launcher {
32+
name = 'helloFXJep493'
33+
noConsole = true
34+
}
35+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'hellofxjep493'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module hellofxJep493 {
2+
requires javafx.controls;
3+
4+
exports org.example;
5+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.example;
2+
3+
import javafx.application.Application;
4+
import javafx.scene.Scene;
5+
import javafx.scene.control.Label;
6+
import javafx.scene.layout.StackPane;
7+
import javafx.stage.Stage;
8+
9+
public class HelloFXJep493 extends Application {
10+
11+
@Override
12+
public void start(Stage stage) {
13+
StackPane pane = new StackPane(new Label("HelloFXJpe493"));
14+
Scene scene = new Scene(pane, 300, 200);
15+
stage.setScene(scene);
16+
stage.show();
17+
}
18+
19+
public static void main(String[] args) {
20+
launch(args);
21+
}
22+
}

0 commit comments

Comments
 (0)