Removed FlatLaf (which was used for theming) and replaced it with JavaFX

This commit is contained in:
coolGi
2023-03-17 19:45:18 +10:30
parent be9547612d
commit 2d8027cd28
2 changed files with 13 additions and 11 deletions
+2 -2
View File
@@ -170,5 +170,5 @@ https://github.com/TheElectronWill/night-config
SVG Salamander for SVG support\
https://github.com/blackears/svgSalamander
FlatLaf for theming (for development testing)\
https://www.formdev.com/flatlaf/
JavaFX for standalone jar and config ui\
https://openjfx.io/
+11 -9
View File
@@ -10,6 +10,9 @@ plugins {
// Manifold preprocessor
id "systems.manifold.manifold-gradle-plugin" version "0.0.2-alpha"
// JavaFX library (useful for ui stuff)
id "org.openjfx.javafxplugin" version "0.0.13"
// Provides mc libraries to core
// id "org.spongepowered.gradle.vanilla" version '0.2.1-SNAPSHOT' apply false
}
@@ -102,6 +105,7 @@ subprojects { p ->
// apply plugin: "org.spongepowered.gradle.vanilla" // Provides minecraft libraries
if (p == project(":core")) {
apply plugin: "application"
apply plugin: "org.openjfx.javafxplugin"
}
@@ -133,7 +137,12 @@ subprojects { p ->
// (This will point to a non-existent class in all sub-projects except "Core")
if (p == project(":core")) {
application {
mainClass.set('com.seibel.lod.core.jar.JarMain')
mainClass.set("com.seibel.lod.core.jar.JarMain")
}
javafx {
version = "19"
modules = ["javafx.controls"]
}
}
@@ -166,11 +175,7 @@ subprojects { p ->
shadowMe("com.electronwill.night-config:toml:${rootProject.nightconfig_version}")
shadowMe("com.electronwill.night-config:json:${rootProject.nightconfig_version}")
// Theming
shadowMe("com.formdev:flatlaf:${rootProject.flatlaf_version}")
// SVG
shadowMe("com.formdev:flatlaf-extras:${rootProject.flatlaf_version}")
shadowMe("com.formdev:svgSalamander:${rootProject.svgSalamander_version}")
@@ -229,9 +234,6 @@ subprojects { p ->
// NightConfig (includes Toml & Json)
relocate 'com.electronwill.nightconfig', 'distanthorizons.libraries.electronwill.nightconfig'
// Theming
relocate 'com.formdev.flatlaf', 'distanthorizons.libraries.formdev.flatlaf'
// SVG
relocate 'com.kitfox.svg', 'distanthorizons.libraries.kitfox.svg'
@@ -448,7 +450,7 @@ allprojects { p ->
tasks.withType(JavaCompile) {
if (isMinecraftSubProject) {
options.release = rootProject.java_version as Integer
options.compilerArgs += ['-Xplugin:Manifold']
options.compilerArgs += ["-Xplugin:Manifold"]
} else {
options.release = 8; // Core & Api should use Java 8 no matter what
//options.release = rootProject.java_version as Integer // But if you want to test some stuff, then this can be enabled