Bläddra i källkod

Update Gradle 8.6 -> 9.2.1

Toni Helenius 3 veckor sedan
förälder
incheckning
9e7bca70b6
5 ändrade filer med 153 tillägg och 141 borttagningar
  1. 142 130
      build.gradle
  2. BIN
      gradle/wrapper/gradle-wrapper.jar
  3. 1 1
      gradle/wrapper/gradle-wrapper.properties
  4. 7 8
      gradlew
  5. 3 2
      gradlew.bat

+ 142 - 130
build.gradle

@@ -1,5 +1,7 @@
 //ant.importBuild 'build.xml'
 import groovy.xml.MarkupBuilder
+import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
+
 import java.util.zip.ZipFile
 
 plugins {
@@ -15,9 +17,9 @@ if (!hasProperty('mainClass')) {
 
 repositories {
 	mavenCentral()
-    maven { url "https://jitpack.io" }
+    maven { url = "https://jitpack.io" }
     maven {
-        url "https://maven.google.com/"
+        url = "https://maven.google.com/"
     }
 }
 
@@ -80,12 +82,12 @@ artifacts {
     //    jar null
 }
 
-task checkPlatformConfig {
+tasks.register('checkPlatformConfig') {
     description = "Downloads the NetBeans platform base and registers it in the SDK project if needed"
     def platformFile = file("nbproject/private/platform-private.properties")
-    if(!platformFile.exists()){
+    if (!platformFile.exists()) {
         def netbeansFolder = file("netbeans")
-        if(!netbeansFolder.exists() || netbeansFolder.list().length == 0){
+        if (!netbeansFolder.exists() || netbeansFolder.list().length == 0) {
             println "Downloading NetBeans Platform base, this only has to be done once.."
             /* The following method is discouraged as it does not handle HTTP 301 Redirects
              * def f = file("netbeans.zip")
@@ -105,40 +107,41 @@ task checkPlatformConfig {
         }
         file("nbproject/private/").mkdirs()
         platformFile.createNewFile()
-        platformFile.write("nbplatform.default.netbeans.dest.dir=${netbeansFolder.absolutePath.replace('\\','/')}\r\n"+\
-                           "nbplatform.default.harness.dir=${netbeansFolder.absolutePath.replace('\\','/')}/harness\r\n")
+        platformFile.write("nbplatform.default.netbeans.dest.dir=${netbeansFolder.absolutePath.replace('\\', '/')}\r\n" + \
+                            "nbplatform.default.harness.dir=${netbeansFolder.absolutePath.replace('\\', '/')}/harness\r\n")
     }
 }
 
-task copyBaseLibs(dependsOn:configurations.corelibs) {
+tasks.register('copyBaseLibs') {
+    dependsOn configurations.corelibs
     doLast {
-        description "Copies the library files needed to run the SDK to "+
-                    "jme3-core-baselibs and jme3-core-libraries"
+        description = "Copies the library files needed to run the SDK to " +
+                "jme3-core-baselibs and jme3-core-libraries"
 
         // for each dependency in corelibs..
         //project.configurations.corelibs.dependencies.each {dep ->
         //println(project.configurations.corelibs.dependencies)
 
-        project.configurations.corelibs.collect {file ->
+        project.configurations.corelibs.collect { file ->
             // copy built jme3 jar files to jme3-core-baselibs
-            if (file.name.startsWith("jme3") && !isSourceOrJavadoc(file.name)){
+            if (file.name.startsWith("jme3") && !isSourceOrJavadoc(file.name)) {
                 copy {
                     from file
                     into "jme3-core-baselibs/release/modules/ext/"
                 }
-            } else if( file.name.contains("Minie") && !isSourceOrJavadoc(file.name)) {
+            } else if (file.name.contains("Minie") && !isSourceOrJavadoc(file.name)) {
                 // Special handling of Minie, since it doesn't follow the name convention
                 copy {
                     from file
                     into "jme3-core-baselibs/release/modules/ext/"
                 }
-            } else if( file.name.contains("Heart") && !isSourceOrJavadoc(file.name)) {
+            } else if (file.name.contains("Heart") && !isSourceOrJavadoc(file.name)) {
                 // Special handling of Minie, since it doesn't follow the name convention
                 copy {
                     from file
                     into "jme3-core-baselibs/release/modules/ext/"
                 }
-            } else if( !isSourceOrJavadoc(file.name)){
+            } else if (!isSourceOrJavadoc(file.name)) {
                 copy {
                     from file
                     into "jme3-core-libraries/release/modules/ext/"
@@ -168,34 +171,35 @@ static def isJmeDep(dep) {
     return dep.startsWith("jme3")
 }
 
-task createBaseXml(dependsOn: configurations.corelibs) {
+tasks.register('createBaseXml') {
+    dependsOn configurations.corelibs
     doLast {
-        description "Creates the project.xml files for "+
-                    "jme3-core-baselibs and jme3-core-libraries"
+        description = "Creates the project.xml files for " +
+                "jme3-core-baselibs and jme3-core-libraries"
         def jmeJarFiles = [] // jme3 jar files
         def externalJarFiles = [] // external jar files
 
         // collect jar files
-        project.configurations.corelibs.collect {file ->
+        project.configurations.corelibs.collect { file ->
             // copy built jme3 jar files to jme3-core-baselibs
-            if (file.name.startsWith("jme3") && !isSourceOrJavadoc(file.name)){
+            if (file.name.startsWith("jme3") && !isSourceOrJavadoc(file.name)) {
 
                 //collect jme jars
-                if(!jmeJarFiles.contains(file)) {
+                if (!jmeJarFiles.contains(file)) {
                     jmeJarFiles.add(file)
                 }
 
-            } else if( file.name.contains("Minie") && !isSourceOrJavadoc(file.name)) {
+            } else if (file.name.contains("Minie") && !isSourceOrJavadoc(file.name)) {
                 // Special handling of Minie, since it doesn't follow the name convention
-                if(!jmeJarFiles.contains(file)) {
+                if (!jmeJarFiles.contains(file)) {
                     jmeJarFiles.add(file)
                 }
-            } else if( file.name.contains("Heart") && !isSourceOrJavadoc(file.name)) {
+            } else if (file.name.contains("Heart") && !isSourceOrJavadoc(file.name)) {
                 // Special handling of Minie, since it doesn't follow the name convention
-                if(!jmeJarFiles.contains(file)) {
+                if (!jmeJarFiles.contains(file)) {
                     jmeJarFiles.add(file)
                 }
-            } else if(!isSourceOrJavadoc(file.name)) {
+            } else if (!isSourceOrJavadoc(file.name)) {
                 //collect external jars
                 externalJarFiles.add(file)
 
@@ -204,14 +208,14 @@ task createBaseXml(dependsOn: configurations.corelibs) {
 
         // collect base packages
         def packages = []
-        jmeJarFiles.each{jarFile ->
+        jmeJarFiles.each { jarFile ->
             ZipFile file = new ZipFile(jarFile)
             file.entries().each { entry ->
-                if(!entry.name.startsWith('META-INF') && entry.name.endsWith('.class')){
+                if (!entry.name.startsWith('META-INF') && entry.name.endsWith('.class')) {
                     // TODO: "/" works on windows?
                     def pathPart = entry.name.substring(0, Math.max(0, entry.name.lastIndexOf('/')))
-                    def classPath = pathPart.replace('/','.');
-                    if(!classPath.empty && !packages.contains(classPath)){
+                    def classPath = pathPart.replace('/', '.');
+                    if (!classPath.empty && !packages.contains(classPath)) {
                         packages.add(classPath)
                     }
                 }
@@ -220,14 +224,14 @@ task createBaseXml(dependsOn: configurations.corelibs) {
 
         // collect library packages
         def extPackages = []
-        externalJarFiles.each{jarFile ->
+        externalJarFiles.each { jarFile ->
             ZipFile file = new ZipFile(jarFile)
             file.entries().each { entry ->
-                if(!entry.name.startsWith('META-INF') && entry.name.endsWith('.class')){
+                if (!entry.name.startsWith('META-INF') && entry.name.endsWith('.class')) {
                     // TODO: "/" works on windows?
                     def pathPart = entry.name.substring(0, Math.max(0, entry.name.lastIndexOf('/')))
-                    def classPath = pathPart.replace('/','.');
-                    if (!classPath.empty && !extPackages.contains(classPath)){
+                    def classPath = pathPart.replace('/', '.');
+                    if (!classPath.empty && !extPackages.contains(classPath)) {
                         extPackages.add(classPath)
                     }
                 }
@@ -236,31 +240,31 @@ task createBaseXml(dependsOn: configurations.corelibs) {
 
         def writer = new StringWriter()
         def xml = new MarkupBuilder(writer)
-        xml.mkp.xmlDeclaration(version:'1.0')
-        xml.project(xmlns:"http://www.netbeans.org/ns/project/1"){
+        xml.mkp.xmlDeclaration(version: '1.0')
+        xml.project(xmlns: "http://www.netbeans.org/ns/project/1") {
             type "org.netbeans.modules.apisupport.project"
             configuration {
-                data(xmlns:"http://www.netbeans.org/ns/nb-module-project/3") {
+                data(xmlns: "http://www.netbeans.org/ns/nb-module-project/3") {
                     "code-name-base" "com.jme3.gde.core.baselibs"
-                    "suite-component"{}
-                    "module-dependencies"{
-                        dependency{
+                    "suite-component" {}
+                    "module-dependencies" {
+                        dependency {
                             "code-name-base" "com.jme3.gde.core.libraries"
-                            "build-prerequisite"{}
-                            "compile-dependency"{}
-                            "run-dependency"{
+                            "build-prerequisite" {}
+                            "compile-dependency" {}
+                            "run-dependency" {
                                 "release-version" "1"
                                 "specification-version" jmeVersion
                             }
                         }
                     }
-                    "public-packages"{
-                        packages.each{
+                    "public-packages" {
+                        packages.each {
                             "package" it
                         }
                     }
-                    jmeJarFiles.each{jarFile ->
-                        "class-path-extension"{
+                    jmeJarFiles.each { jarFile ->
+                        "class-path-extension" {
                             "runtime-relative-path" "ext/${jarFile.name}"
                             "binary-origin" "release/modules/ext/${jarFile.name}"
                         }
@@ -274,21 +278,21 @@ task createBaseXml(dependsOn: configurations.corelibs) {
 
         def extWriter = new StringWriter()
         def extXml = new MarkupBuilder(extWriter)
-    //    extXml.mkp.xmlDeclaration(version:'1.0')
-        extXml.project(xmlns:"http://www.netbeans.org/ns/project/1"){
+        //    extXml.mkp.xmlDeclaration(version:'1.0')
+        extXml.project(xmlns: "http://www.netbeans.org/ns/project/1") {
             type "org.netbeans.modules.apisupport.project"
             configuration {
-                data(xmlns:"http://www.netbeans.org/ns/nb-module-project/3") {
+                data(xmlns: "http://www.netbeans.org/ns/nb-module-project/3") {
                     "code-name-base" "com.jme3.gde.core.libraries"
-                    "suite-component"{}
-                    "module-dependencies"{}
-                    "public-packages"{
-                        extPackages.each{
+                    "suite-component" {}
+                    "module-dependencies" {}
+                    "public-packages" {
+                        extPackages.each {
                             "package" it
                         }
                     }
-                    externalJarFiles.each{jarFile ->
-                        "class-path-extension"{
+                    externalJarFiles.each { jarFile ->
+                        "class-path-extension" {
                             "runtime-relative-path" "ext/${jarFile.name}"
                             "binary-origin" "release/modules/ext/${jarFile.name}"
                         }
@@ -305,34 +309,35 @@ createBaseXml.inputs.files configurations.corelibs.resolve()
 createBaseXml.outputs.file "jme3-core-baselibs/nbproject/project.xml"
 createBaseXml.outputs.file "jme3-core-libraries/nbproject/project.xml"
 
-task copyProjectLibs(dependsOn: [configurations.corelibs, configurations.testdatalibs]) {
+tasks.register('copyProjectLibs') {
+    dependsOn configurations.corelibs, configurations.testdatalibs
     doLast {
-        description "Copies the jar files needed to supply the J2SE Libraries in the "+
-                    "SDK to jme3-project-baselibs and jme3-project-libraries"
+        description = "Copies the jar files needed to supply the J2SE Libraries in the " +
+                "SDK to jme3-project-baselibs and jme3-project-libraries"
 
         // for each dependency in corelibs and optlibs..
         def deps = []
         deps.addAll(project.configurations.corelibs.files)
         deps.addAll(project.configurations.optlibs.files)
-        deps.each {dep ->
+        deps.each { dep ->
             // copy jme3 jar files, sources and javadocs to jme3-project-baselibs
 
-            if(isSource(dep.name)){
+            if (isSource(dep.name)) {
                 copy {
                     from dep
                     into "jme3-project-baselibs/release/libs/"
                 }
-            } else if(isJavadoc(dep.name)){
+            } else if (isJavadoc(dep.name)) {
                 copy {
                     from dep
                     into "jme3-project-baselibs/release/libs/"
                 }
-            } else if(isJmeDep(dep.name)){
+            } else if (isJmeDep(dep.name)) {
                 copy {
                     from dep
                     into "jme3-project-baselibs/release/libs/"
                 }
-            } else{
+            } else {
                 copy {
                     from dep
                     into "jme3-project-libraries/release/libs/"
@@ -341,13 +346,13 @@ task copyProjectLibs(dependsOn: [configurations.corelibs, configurations.testdat
 
         }
 
-        project.configurations.testdatalibs.files.each {dep ->
+        project.configurations.testdatalibs.files.each { dep ->
             // copy jme3 test data to jme3-project-testdata
-            if(isJmeDep(dep.name)){
+            if (isJmeDep(dep.name)) {
                 copy {
                     from dep
                     into "jme3-project-testdata/release/modules/ext/"
-                    rename ("jme3-testdata(.*)", "jme3-testdata.jar")
+                    rename("jme3-testdata(.*)", "jme3-testdata.jar")
                 }
             }
         }
@@ -361,68 +366,69 @@ copyProjectLibs.outputs.dir "jme3-project-libraries/release/libs/"
 copyProjectLibs.outputs.dir "jme3-project-testdata/release/modules/ext/"
 
 // workaround method to add a tag with the name "name" and "file" to an XML MarkupBuilder
-def makeName(builder, nameR) { builder.name nameR }
-def makeFile(builder, nameR) { builder.file(name:nameR, url:nameR) }
+static def makeName(builder, nameR) { builder.name nameR }
 
-task createProjectXml(dependsOn: configurations.corelibs) {
+static def makeFile(builder, nameR) { builder.file(name:nameR, url:nameR) }
+
+tasks.register('createProjectXml') {
+    dependsOn configurations.corelibs
     doLast {
-        description "Creates needed J2SE library and layer XML files in jme3-project-baselibs"
+        description = "Creates needed J2SE library and layer XML files in jme3-project-baselibs"
 
         def eol = System.properties.'line.separator'
         def j2seLibraries = [] // created J2SE library descriptors
 
 
-
         // for each dependency in corelibs..
         def deps = []
         deps.addAll(project.configurations.corelibs.dependencies)
         deps.addAll(project.configurations.optlibs.dependencies)
-        deps.each {dep ->
+        deps.each { dep ->
             def jmeJarFiles = [] // jme3 jar files
             def jmeSourceFiles = [] // jme3 sources
             def jmeJavadocFiles = [] // jme3 javadoc
             def externalJarFiles = [] // external jar files
-            if(j2seLibraries.contains(dep.name+".xml")){
+            if (j2seLibraries.contains(dep.name + ".xml")) {
                 return;
             }
 
-            j2seLibraries.add(dep.name+".xml")
-            project.configurations.corelibs.files{ d -> return d.name == dep.name}.each{ file ->
-                if(isSource(file.name)){
-                    if(!jmeSourceFiles.contains(file.name)){
+            j2seLibraries.add(dep.name + ".xml")
+            project.configurations.corelibs.files.findAll { d -> return d.name == dep.name }.each { file ->
+                if (isSource(file.name)) {
+                    if (!jmeSourceFiles.contains(file.name)) {
                         jmeSourceFiles.add(file.name)
                     }
-                } else if(isJavadoc(file.name)){
-                    if(!jmeJavadocFiles.contains(file.name)){
+                } else if (isJavadoc(file.name)) {
+                    if (!jmeJavadocFiles.contains(file.name)) {
                         jmeJavadocFiles.add(file.name)
                     }
-                } else if(isJmeDep(file.name)){
-                    if(!jmeJarFiles.contains(file.name)){
+                } else if (isJmeDep(file.name)) {
+                    if (!jmeJarFiles.contains(file.name)) {
                         jmeJarFiles.add(file.name)
                     }
-                } else{
-                    if(!externalJarFiles.contains(file.name)){
+                } else {
+                    if (!externalJarFiles.contains(file.name)) {
                         externalJarFiles.add(file.name)
                     }
                 }
             }
 
-            project.configurations.optlibs.files{ d -> return d.name == dep.name}.each{ file ->
+            project.configurations.optlibs.files.findAll { d -> return d.name == dep.name }.each { file ->
 
-                if(isSource(file.name)){
-                    if(!jmeSourceFiles.contains(file.name)){
+                if (isSource(file.name)) {
+                    if (!jmeSourceFiles.contains(file.name)) {
                         jmeSourceFiles.add(file.name)
                     }
-                } else if(isJavadoc(file.name)){
-                    if(!jmeJavadocFiles.contains(file.name)){
+                } else if (isJavadoc(file.name)) {
+                    if (!jmeJavadocFiles.contains(file.name)) {
                         jmeJavadocFiles.add(file.name)
                     }
-                } else if(isJmeDep(file.name)){
-                    if(!jmeJarFiles.contains(file.name)){
+                } else if (isJmeDep(file.name)) {
+                    if (!jmeJarFiles.contains(file.name)) {
                         jmeJarFiles.add(file.name)
                     }
                 } else {
-                    if(!externalJarFiles.contains(file.name)){
+                    if (!externalJarFiles.contains(file.name)) {
                         externalJarFiles.add(file.name)
                     }
                 }
@@ -435,18 +441,17 @@ task createProjectXml(dependsOn: configurations.corelibs) {
             }
 
 
-
             // create J2SE library descriptor xml file
             def libraryWriter = new StringWriter()
             def libraryXml = new MarkupBuilder(libraryWriter)
-    //        xml.mkp.xmlDeclaration(version:'1.0')
+            //        xml.mkp.xmlDeclaration(version:'1.0')
             libraryWriter << '<?xml version="1.0" encoding="UTF-8"?>' << eol
             libraryWriter << '<!DOCTYPE library PUBLIC "-//NetBeans//DTD Library Declaration 1.0//EN" "http://www.netbeans.org/dtds/library-declaration-1_0.dtd">' << eol
-            libraryXml.library(version:"1.0", encoding: "UTF-8"){
+            libraryXml.library(version: "1.0", encoding: "UTF-8") {
                 makeName(libraryXml, "${dep.name}")
                 type "j2se"
                 "localizing-bundle" "com.jme3.gde.project.baselibs.Bundle"
-                volume{
+                volume {
                     type "classpath"
 
                     resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jmeJarFiles[0]}!/"
@@ -457,7 +462,7 @@ task createProjectXml(dependsOn: configurations.corelibs) {
                      * to build errors then.
                      */
                     if (dep.name.equals("jme3_xbuf")) {
-                        jmeJarFiles.each{jar ->
+                        jmeJarFiles.each { jar ->
                             if (jar.startsWith("jme3_xbuf")) {
                                 /* Technically you would only need the loaders, not the spatial viewer,
                                  * but users can edit the library if they want to strip off
@@ -467,19 +472,19 @@ task createProjectXml(dependsOn: configurations.corelibs) {
                         }
                     }
 
-                    externalJarFiles.each{jar ->
+                    externalJarFiles.each { jar ->
                         resource "jar:nbinst://com.jme3.gde.project.libraries/libs/${jar}!/"
                     }
                 }
-                volume{
+                volume {
                     type "src"
-                    jmeSourceFiles.each{jar ->
+                    jmeSourceFiles.each { jar ->
                         resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jar}!/"
                     }
                 }
-                volume{
+                volume {
                     type "javadoc"
-                    jmeJavadocFiles.each{jar ->
+                    jmeJavadocFiles.each { jar ->
                         resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jar}!/"
                     }
                 }
@@ -492,13 +497,13 @@ task createProjectXml(dependsOn: configurations.corelibs) {
         // create layer.xml file with entries of library xml files
         def layerWriter = new StringWriter()
         def layerXml = new MarkupBuilder(layerWriter)
-    //    layerXml.mkp.xmlDeclaration(version:'1.0')
+        //    layerXml.mkp.xmlDeclaration(version:'1.0')
         layerWriter << '<?xml version="1.0" encoding="UTF-8"?>' << eol
         layerWriter << '<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">' << eol
-        layerXml.filesystem{
-            folder(name:"org-netbeans-api-project-libraries"){
-                folder(name:"Libraries"){
-                    j2seLibraries.each{lib ->
+        layerXml.filesystem {
+            folder(name: "org-netbeans-api-project-libraries") {
+                folder(name: "Libraries") {
+                    j2seLibraries.each { lib ->
                         makeFile(layerXml, lib)
                     }
                 }
@@ -512,17 +517,17 @@ createProjectXml.inputs.files configurations.corelibs.resolve()
 createProjectXml.inputs.files configurations.optlibs.resolve()
 createProjectXml.outputs.dir "jme3-project-baselibs/src/com/jme3/gde/project/baselibs/"
 
-task copyTestSources {
+tasks.register('copyTestSources') {
     doLast {
-        project.configurations.examplelibs.files.each{dep ->
-            if(isSource(dep.name)){
-                copy{
+        project.configurations.examplelibs.files.each { dep ->
+            if (isSource(dep.name)) {
+                copy {
                     from {
                         zipTree(dep)
                     }
                     into "JME3TestsTemplate/src/"
                 }
-                copy{
+                copy {
                     from {
                         zipTree(dep)
                     }
@@ -540,7 +545,8 @@ ant.properties['plugins.version'] = jmeVersion
 ant.properties['app.version']= jmePomVersion
 ant.properties['nbm.revision']= jmeNbmRevision
 
-task overrideHarness(dependsOn: ['checkPlatformConfig', 'updateNetbeans']) {
+tasks.register('overrideHarness') {
+    dependsOn 'checkPlatformConfig', 'updateNetbeans'
     doLast {
         def props = new Properties()
         props.load(new FileInputStream("$rootDir/harness-override/override.properties"))
@@ -548,11 +554,11 @@ task overrideHarness(dependsOn: ['checkPlatformConfig', 'updateNetbeans']) {
         def patch_file = { f ->
             def g = file("harness-override/" + f.getName())
             if (!f.exists()) {
-                throw new GradleException('Cannot find targetFile: ' +  f.getAbsolutePath());
+                throw new GradleException('Cannot find targetFile: ' + f.getAbsolutePath());
             }
 
             if (!g.exists()) {
-                throw new GradleException('Cannot find sourceFile: ' +  g.getAbsolutePath());
+                throw new GradleException('Cannot find sourceFile: ' + g.getAbsolutePath());
             }
 
             if (getSHA256Hash(f) == props[f.getName() + ".hashAfter"]) {
@@ -572,7 +578,7 @@ task overrideHarness(dependsOn: ['checkPlatformConfig', 'updateNetbeans']) {
                 }
 
             } else {
-                throw new GradleException('Checksum Mismatch: targetFile ' + f.getName() + ' has invalid hash ' + getSHA256Hash(f) +  '. Did you update Netbeans without changing harness-override/override.properties?');
+                throw new GradleException('Checksum Mismatch: targetFile ' + f.getName() + ' has invalid hash ' + getSHA256Hash(f) + '. Did you update Netbeans without changing harness-override/override.properties?');
             }
         }
 
@@ -584,21 +590,24 @@ task overrideHarness(dependsOn: ['checkPlatformConfig', 'updateNetbeans']) {
 overrideHarness.outputs.files([ 'netbeans/harness/launchers/app.exe', 'netbeans/harness/launchers/app64.exe', 'netbeans/harness/launchers/pre7_app.exe'])
 overrideHarness.inputs.files([ 'netbeans/harness/launchers/app.exe', 'netbeans/harness/launchers/app64.exe', 'netbeans/harness/launchers/pre7_app.exe', 'harness-override/override.properties'])
 
-task updateNetbeans(type: Exec, dependsOn: checkPlatformConfig) {
-    ignoreExitValue true // We make netbeans fail by specifying "exit" which is no java file to open (this command would open the whole IDE)
-    if (org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.currentOperatingSystem.isWindows()) {
+tasks.register('updateNetbeans', Exec) {
+    dependsOn checkPlatformConfig
+    ignoreExitValue = true
+    // We make netbeans fail by specifying "exit" which is no java file to open (this command would open the whole IDE)
+    if (DefaultNativePlatform.currentOperatingSystem.isWindows()) {
         commandLine 'netbeans/bin/netbeans.exe', '--update-all', '--modules', '--refresh', '--nosplash', '--nogui', 'exit'
     } else {
         commandLine 'netbeans/bin/netbeans', '--update-all', '--modules', '--refresh', '--nosplash', '--nogui', 'exit'
     }
 }
 
-task buildSdk(dependsOn: [copyBaseLibs, copyProjectLibs, createProjectXml, createBaseXml, copyTestSources]) {
+tasks.register('buildSdk') {
+    dependsOn copyBaseLibs, copyProjectLibs, createProjectXml, createBaseXml, copyTestSources
     doLast {
         ant.propertyfile(file: "nbproject/project.properties") {
-            entry( key: "plugins.version", value: "${jmeVersion}")
-            entry( key: "app.version", value: "${jmePomVersion}")
-            entry( key: "nbm.revision", value: "${jmeNbmRevision}")
+            entry(key: "plugins.version", value: "${jmeVersion}")
+            entry(key: "app.version", value: "${jmePomVersion}")
+            entry(key: "nbm.revision", value: "${jmeNbmRevision}")
         }
         ant.ant(dir: ".", antfile: "build.xml", target: "build")
     }
@@ -612,13 +621,14 @@ file('.').eachDir{
 }
 //buildSdk.outputs.dir "build"
 
-task run(dependsOn: buildSdk) {
+tasks.register('run') {
+    dependsOn buildSdk
     doLast {
         ant.ant(dir: ".", antfile: "build.xml", target: "run")
     }
 }
 
-task cleanSdk() {
+tasks.register('cleanSdk') {
     doLast {
         ant.ant(dir: ".", antfile: "build.xml", target: "clean")
         file("jme3-core-baselibs/release/").deleteDir()
@@ -633,21 +643,22 @@ task cleanSdk() {
     }
 }
 
-task extractPlatformIndependent(type: Copy) {
+tasks.register('extractPlatformIndependent', Copy) {
     from zipTree('dist/jmonkeyplatform.zip')
     into "dist/temp/"
 
     exclude("jmonkeyplatform/etc/jmonkeyplatform.conf")
 }
 
-task patchPlatformIndependent(type: Copy, dependsOn: extractPlatformIndependent) {
+tasks.register('patchPlatformIndependent', Copy) {
+    dependsOn extractPlatformIndependent
     from zipTree('dist/jmonkeyplatform.zip')
     into "dist/temp/"
 
     include("jmonkeyplatform/etc/jmonkeyplatform.conf")
 
     filter { String line ->
-        line.startsWith('jdkhome=') ? '#jdkhome="/path/to/jdk"': line
+        line.startsWith('jdkhome=') ? '#jdkhome="/path/to/jdk"' : line
     }
 
     doLast {
@@ -655,7 +666,8 @@ task patchPlatformIndependent(type: Copy, dependsOn: extractPlatformIndependent)
     }
 }
 
-task fixPlatformIndependent(dependsOn: patchPlatformIndependent, type: Zip) {
+tasks.register('fixPlatformIndependent', Zip) {
+    dependsOn patchPlatformIndependent
     description = "We compile our installers with the bundled jdk, but the platform independent zip doesn't have the jdk. For this we need to change the jmonkeyplatform.zip after building the installers to not have a jdk bundled"
 
     from 'dist/temp'
@@ -668,7 +680,7 @@ task fixPlatformIndependent(dependsOn: patchPlatformIndependent, type: Zip) {
 }
 
 wrapper {
-    gradleVersion = '8.6'
+    gradleVersion = '9.2.1'
 }
 
 //jar.dependsOn(buildSdk)

BIN
gradle/wrapper/gradle-wrapper.jar


+ 1 - 1
gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,6 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
 networkTimeout=10000
 validateDistributionUrl=true
 zipStoreBase=GRADLE_USER_HOME

+ 7 - 8
gradlew

@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright © 2015-2021 the original authors.
+# Copyright © 2015 the original authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+# SPDX-License-Identifier: Apache-2.0
+#
 
 ##############################################################################
 #
@@ -55,7 +57,7 @@
 #       Darwin, MinGW, and NonStop.
 #
 #   (3) This script is generated from the Groovy template
-#       https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 #       within the Gradle project.
 #
 #       You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
 # shellcheck disable=SC2034
 APP_BASE_NAME=${0##*/}
 # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
-APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD=maximum
@@ -112,7 +114,6 @@ case "$( uname )" in                #(
   NONSTOP* )        nonstop=true ;;
 esac
 
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
 
 
 # Determine the Java command to use to start the JVM.
@@ -170,7 +171,6 @@ fi
 # For Cygwin or MSYS, switch paths to Windows format before running java
 if "$cygwin" || "$msys" ; then
     APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
-    CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
 
     JAVACMD=$( cygpath --unix "$JAVACMD" )
 
@@ -203,15 +203,14 @@ fi
 DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
 
 # Collect all arguments for the java command:
-#   * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
 #     and any embedded shellness will be escaped.
 #   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
 #     treated as '${Hostname}' itself on the command line.
 
 set -- \
         "-Dorg.gradle.appname=$APP_BASE_NAME" \
-        -classpath "$CLASSPATH" \
-        org.gradle.wrapper.GradleWrapperMain \
+        -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
         "$@"
 
 # Stop when "xargs" is not available.

+ 3 - 2
gradlew.bat

@@ -13,6 +13,8 @@
 @rem See the License for the specific language governing permissions and
 @rem limitations under the License.
 @rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
 
 @if "%DEBUG%"=="" @echo off
 @rem ##########################################################################
@@ -68,11 +70,10 @@ goto fail
 :execute
 @rem Setup the command line
 
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
 
 
 @rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
 
 :end
 @rem End local scope for the variables with windows NT shell