Open
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 11.0.8
java-version: 14.0.2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,9 +13,9 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 11.0.8
java-version: 14.0.2
- name: Build with Gradle
run: ./gradlew deploy
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'application'
id 'org.beryx.jlink' version '2.15.1'
id 'org.beryx.jlink' version '2.21.4'
id 'org.openjfx.javafxplugin' version '0.0.8'
}

Expand All@@ -10,16 +10,21 @@ import org.gradle.internal.jvm.Jvm
group 'template'
version '1.0-SNAPSHOT'

sourceCompatibility = 11
targetCompatibility = 11
sourceCompatibility = 14
targetCompatibility = 14

application {
mainModule = myMainModuleName
mainClass = myMainClassName
}

repositories {
mavenCentral()
}

mainClassName = mainModule + "/" + mainClass

jlink {
moduleName = application.mainModule
mainClass = application.mainClass
javaHome.set(Jvm.current().getJavaHome().getAbsolutePath())
launcher {
jvmArgs += rootProject.jvmArgs
Expand All@@ -31,7 +36,7 @@ run {
}

javafx {
version = "11"
version = "14"
modules = [
'javafx.controls',
'javafx.fxml',
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,11 +4,11 @@ def currentJvm = Jvm.current()
println "Java version: ${currentJvm.getJavaVersion()}"
println "Java home: ${currentJvm.getJavaHome()}"

if (currentJvm.getJavaVersion() != JavaVersion.VERSION_11)
throw new GradleException("Java version should be 11")
if (currentJvm.getJavaVersion() != JavaVersion.VERSION_14)
throw new GradleException("Java version should be 14")

ext.mainClass = "template.Main"
ext.mainModule = "template"
ext.myMainClassName = "template.Main"
ext.myMainModuleName = "template"
ext.jvmArgs = [

]
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,8 +35,8 @@ model {
// Define a preprocessor macro for every binary
cppCompiler.define "NDEBUG"

def mainClassName = mainClass.replaceAll("\\.", "/")
def jvmArgsArrayMacro = "{\"--module-path=.\",\"--add-modules=$mainModule\""
def mainClassName = myMainClassName.replaceAll("\\.", "/")
def jvmArgsArrayMacro = "{\"--module-path=.\",\"--add-modules=$myMainModuleName\""
for (arg in rootProject.jvmArgs) {
jvmArgsArrayMacro += ",\"$arg\""
}
Expand Down