Browse Source

:construction: Switched to gradle.properties for dependencies

:arrow_up: Upgraded JavaFX to version 19.0.2
:arrow_up: Upgraded ikonli to version 12.3.1
:arrow_up: Upgraded Junit to version 5.9.1
Alessadro Parisi 2 years ago
parent
commit
3a03b8190d
4 changed files with 58 additions and 30 deletions
  1. 3 3
      build.gradle
  2. 15 15
      demo/build.gradle
  3. 25 0
      gradle.properties
  4. 15 12
      materialfx/build.gradle

+ 3 - 3
build.gradle

@@ -1,10 +1,10 @@
 plugins {
     id 'java-library'
-    id 'org.openjfx.javafxplugin' version '0.0.12' apply false
+    id 'org.openjfx.javafxplugin' version "$jfxPlugin" apply false
 }
 
 group 'io.github.palexdev'
-version '11.13.9'
+version "$materialfx"
 
 repositories {
     mavenCentral()
@@ -14,7 +14,7 @@ subprojects {
     apply plugin: 'org.openjfx.javafxplugin'
 
     javafx {
-        version = '18'
+        version = "$jfx"
         modules = ['javafx.controls', 'javafx.fxml', 'javafx.media', 'javafx.swing', 'javafx.web']
     }
 }

+ 15 - 15
demo/build.gradle

@@ -2,7 +2,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
 
 plugins {
     id 'application'
-    id 'org.beryx.jlink' version '2.25.0'
+    id 'org.beryx.jlink' version "$jlink"
 }
 
 repositories {
@@ -14,19 +14,19 @@ repositories {
 }
 
 dependencies {
-    testImplementation "org.testfx:testfx-core:4.0.16-alpha"
-    testImplementation "org.testfx:testfx-junit5:4.0.16-alpha"
-
-    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
-    testImplementation 'org.junit.platform:junit-platform-suite-api:1.8.1'
-    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
-
-    implementation name: 'scenicview'
-    implementation("fr.brouillard.oss:cssfx:11.4.0") { exclude group: 'org.openjfx' }
-    implementation 'org.kordamp.ikonli:ikonli-core:12.2.0'
-    implementation 'org.kordamp.ikonli:ikonli-javafx:12.2.0'
-    implementation 'org.kordamp.ikonli:ikonli-fontawesome5-pack:12.2.0'
-    implementation 'io.github.palexdev:virtualizedfx:11.2.6'
+    testImplementation "org.testfx:testfx-core:$testfx"
+    testImplementation "org.testfx:testfx-junit5:$testfx"
+
+    testImplementation "org.junit.jupiter:junit-jupiter-api:$junit"
+    testImplementation "org.junit.platform:junit-platform-suite-api:$junitSuite"
+    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit"
+
+    implementation "io.github.palexdev:scenicview:$scenicView"
+    implementation("fr.brouillard.oss:cssfx:$cssfx") { exclude group: 'org.openjfx' }
+    implementation "org.kordamp.ikonli:ikonli-core:$ikonli"
+    implementation "org.kordamp.ikonli:ikonli-javafx:$ikonli"
+    implementation "org.kordamp.ikonli:ikonli-fontawesome5-pack:$ikonli"
+    implementation "io.github.palexdev:virtualizedfx:$vfx"
     implementation project(':materialfx')
 }
 
@@ -82,7 +82,7 @@ jlink {
     addExtraDependencies('javafx')
 }
 
-task doPackageAll {
+tasks.register('doPackageAll') {
     doLast {
         if (Os.isFamily(Os.FAMILY_UNIX)) {
             exec {

+ 25 - 0
gradle.properties

@@ -0,0 +1,25 @@
+#--------------------------------------#
+# Versions                             #
+#--------------------------------------#
+jdk=11
+testJdk=17
+materialfx=11.13.9
+
+# Plugins
+jfxPlugin=0.0.13
+jlink=2.25.0
+bnd=6.2.0
+mavenPublish=0.19.0
+shadowJarPlugin=7.1.2
+
+# Dependencies
+jfx=19.0.2
+vfx=11.2.6
+cssfx=11.4.0
+ikonli=12.3.1
+
+# Test Dependencies
+junit=5.9.1
+junitSuite=1.8.1
+testfx=4.0.16-alpha
+scenicView=17.0.2

+ 15 - 12
materialfx/build.gradle

@@ -2,9 +2,9 @@ import org.apache.tools.ant.taskdefs.condition.Os
 
 plugins {
     id 'java-library'
-    id 'biz.aQute.bnd.builder' version '6.2.0'
-    id 'com.vanniktech.maven.publish' version '0.19.0'
-    id 'com.github.johnrengelman.shadow' version '7.1.2'
+    id 'biz.aQute.bnd.builder' version "$bnd"
+    id 'com.vanniktech.maven.publish' version "$mavenPublish"
+    id 'com.github.johnrengelman.shadow' version "$shadowJarPlugin"
 }
 
 repositories {
@@ -16,14 +16,15 @@ repositories {
 }
 
 compileJava {
-    sourceCompatibility = '11'
-    targetCompatibility = '11'
+    sourceCompatibility = "$jdk"
+    targetCompatibility = "$jdk"
 }
 
 dependencies {
-    testImplementation('junit:junit:4.13.2')
+    testImplementation "org.junit.jupiter:junit-jupiter-api:$junit"
+    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit"
 
-    api 'io.github.palexdev:virtualizedfx:11.2.6'
+    api "io.github.palexdev:virtualizedfx:$vfx"
 }
 
 javafx {
@@ -44,12 +45,14 @@ javadoc {
                      'https://openjfx.io/javadoc/17']
 }
 
-task javadocJar(type: Jar, dependsOn: javadoc) {
+tasks.register('javadocJar', Jar) {
+    dependsOn javadoc
     archiveClassifier.set('javadoc')
     from javadoc.destinationDir
 }
 
-task sourcesJarBuild(type: Jar, dependsOn: classes) {
+tasks.register('sourcesJarBuild', Jar) {
+    dependsOn classes
     archiveClassifier.set('sources')
     from sourceSets.main.allSource
 }
@@ -74,11 +77,11 @@ jar {
 shadowJar {
     mergeServiceFiles()
     dependencies {
-        include(dependency('io.github.palexdev:virtualizedfx:11.2.6'))
+        include(dependency("io.github.palexdev:virtualizedfx:$vfx"))
     }
 }
 
-task copyJar(type: Copy) {
+tasks.register('copyJar', Copy) {
     from jar
     if (Os.isFamily(Os.FAMILY_WINDOWS)) {
         into System.getenv("APPDATA") + '/Scene Builder/Library'
@@ -89,7 +92,7 @@ task copyJar(type: Copy) {
     }
 }
 
-task removeBnd(type: Delete) {
+tasks.register('removeBnd', Delete) {
     delete fileTree(project.buildDir) {
         include '**/*.bnd'
     }