Skip to content

Kh/java17 update #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ jobs:
run:
export DISPLAY=:99

- name: Pull a JavaFX JDK
run: wget http://static.azul.com/zulu/bin/zulu8.44.0.13-ca-fx-jdk8.0.242-linux_x64.tar.gz

- name: After JDK download, list directory contnts
run: pwd; ls -la

- name: Build with Gradle
run: bash makeJar.sh

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
/MUJOCO_LOG.TXT
/physicsTest/
/zulu8.*.tar.gz
/zulu17.50.19-ca-fx-jdk17.0.11-linux_x64.tar.gz
127 changes: 114 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ buildscript {
}
]
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
}
}

boolean is64Bit() {
Expand Down Expand Up @@ -74,9 +71,12 @@ plugins {
id 'signing'
id 'application'
id 'eclipse'
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'org.openjfx.javafxplugin' version '0.0.13'apply false
}
apply plugin: 'com.github.johnrengelman.shadow'
if (project == rootProject) {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'org.openjfx.javafxplugin'
apply plugin: 'application'
}else {
apply plugin: 'java-library'
Expand Down Expand Up @@ -356,6 +356,9 @@ dependencies {
// https://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea
implementation group: 'com.fifesoft', name: 'rsyntaxtextarea', version: '3.4.1'

// https://mvnrepository.com/artifact/eu.mihosoft.monacofx/monacofx
implementation("eu.mihosoft.monacofx:monacofx:0.0.8")

//compile 'org.bubblecloud.jbullet:jbullet:2.72.2.4'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svggen
implementation group: 'org.apache.xmlgraphics', name: 'batik-all', version: '1.17'
Expand Down Expand Up @@ -441,17 +444,115 @@ eclipse{
}
}
}

// Start cadoodle build transfer

subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
targetCompatibility = 17

eclipse {
classpath {
downloadSources = true
downloadJavadoc = true
file {
whenMerged {
entries.forEach { entry ->
if (entry.kind == 'lib') {
entry.entryAttributes['module'] = 'true'
}
}
}
}
}
jdt {
sourceCompatibility = 1.8
targetCompatibility = 17
}
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
}
}

subprojects { subproject ->
subproject.afterEvaluate {
if (subproject.plugins.hasPlugin('com.github.johnrengelman.shadow')) {
subproject.tasks.matching { it.name == 'shadowJar' }.all {
System.out.println("Disabling Shadowjar for "+it)
it.enabled = false
}
}
}
}


javafx {
version = '17' // or whichever version you're using
modules = [
'javafx.controls',
'javafx.fxml',
'javafx.graphics'] // add other modules as needed
}
tasks.withType(Test) {
useJUnitPlatform()
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
}
def javafxOptions = [
'--add-exports', 'javafx.graphics/com.sun.javafx.css=ALL-UNNAMED',
'--add-exports', 'javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED',
'--add-exports', 'javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED',
'--add-exports', 'javafx.base/com.sun.javafx.event=ALL-UNNAMED',
'--add-exports', 'javafx.controls/com.sun.javafx.scene.control.skin.resources=ALL-UNNAMED',
'--add-exports', 'javafx.graphics/com.sun.javafx.util=ALL-UNNAMED',
'--add-exports', 'javafx.graphics/com.sun.javafx.scene.input=ALL-UNNAMED',
'--add-opens','javafx.graphics/javafx.scene=ALL-UNNAMED',
'--add-opens','java.base/java.io=ALL-UNNAMED',
'--add-opens','java.base/java.lang=ALL-UNNAMED'
]
run {
jvmArgs = javafxOptions
}
application {
// Define the main class for the application.
mainClass = 'com.neuronrobotics.bowlerstudio.BowlerStudio'
applicationDefaultJvmArgs =javafxOptions
}

tasks.withType(JavaCompile) {
options.compilerArgs += [
'--add-modules', 'ALL-MODULE-PATH',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.io=ALL-UNNAMED'
]+javafxOptions
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}

shadowJar {
archiveBaseName.set('BowlerStudio')
archiveClassifier.set('')
archiveVersion.set('')
zip64 true
mainClassName = 'com.neuronrobotics.bowlerstudio.BowlerStudio'
if (project == rootProject) {
baseName = 'BowlerStudio'
classifier = ""
}else {
archiveBaseName.set('BowlerStudio')
archiveClassifier.set('')
archiveVersion.set('')
}
mergeServiceFiles()
}
//shadowJar {
// zip64 true
// mainClassName = 'com.neuronrobotics.bowlerstudio.BowlerStudio'
// if (project == rootProject) {
// baseName = 'BowlerStudio'
// classifier = ""
// }else {
// archiveBaseName.set('BowlerStudio')
// archiveClassifier.set('')
// archiveVersion.set('')
// }
// mergeServiceFiles()
//}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading