diff --git a/spine-libgdx/build.gradle b/spine-libgdx/build.gradle index bb7497880..4e6d10ecf 100644 --- a/spine-libgdx/build.gradle +++ b/spine-libgdx/build.gradle @@ -1,84 +1,84 @@ ext { - libgdxVersion = "1.12.2-SNAPSHOT" + libgdxVersion = "1.12.2-SNAPSHOT" } allprojects { - apply plugin: "java" + apply plugin: "java" - sourceSets.main.java.srcDirs = ["src"] + sourceSets.main.java.srcDirs = ["src"] - repositories { - mavenLocal() - maven { url "https://oss.sonatype.org/content/repositories/snapshots" } - mavenCentral() - } + repositories { + mavenLocal() + maven { url "https://oss.sonatype.org/content/repositories/snapshots" } + mavenCentral() + } - tasks.withType(JavaCompile).configureEach { - sourceCompatibility = '1.7' - targetCompatibility = '1.7' - options.release.set(7) // Ensures Java 8 bytecode is produced - } + tasks.withType(JavaCompile).configureEach { + sourceCompatibility = '16' + targetCompatibility = '16' + options.release.set(16) + } } project("spine-libgdx") { - apply plugin: "java-library" - apply plugin: "maven-publish" - apply plugin: "signing" + apply plugin: "java-library" + apply plugin: "maven-publish" + apply plugin: "signing" - sourceSets { - main { - resources { - srcDirs = ["src"] // Add this line to include non-Java files from src directory - include "**/*.gwt.xml" // Add this to specifically include GWT module files - } - } - } + sourceSets { + main { + resources { + srcDirs = ["src"] // Add this line to include non-Java files from src directory + include "**/*.gwt.xml" // Add this to specifically include GWT module files + } + } + } - dependencies { - implementation "com.badlogicgames.gdx:gdx:$libgdxVersion" - } + dependencies { + implementation "com.badlogicgames.gdx:gdx:$libgdxVersion" + } } apply from: 'publishing.gradle' project("spine-skeletonviewer") { - jar { - duplicatesStrategy = DuplicatesStrategy.INCLUDE + jar { + duplicatesStrategy = DuplicatesStrategy.INCLUDE - manifest { - attributes "Main-Class": "com.esotericsoftware.spine.SkeletonViewer" - } + manifest { + attributes "Main-Class": "com.esotericsoftware.spine.SkeletonViewer" + } - from { - configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } - } + from { + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } - dependsOn(project(":spine-libgdx").tasks.named('jar')) - } + dependsOn(project(":spine-libgdx").tasks.named('jar')) + } - tasks.named('build').configure { - dependsOn(tasks.named('jar')) - } + tasks.named('build').configure { + dependsOn(tasks.named('jar')) + } - tasks.withType(JavaCompile).configureEach { - sourceCompatibility = '1.8' - targetCompatibility = '1.8' - options.release.set(8) // Ensures Java 8 bytecode is produced - } + tasks.withType(JavaCompile).configureEach { + sourceCompatibility = '16' + targetCompatibility = '16' + options.release.set(16) + } } configure(subprojects - project("spine-libgdx")) { - sourceSets.main.resources.srcDirs = ["assets"] + sourceSets.main.resources.srcDirs = ["assets"] - dependencies { - implementation project(":spine-libgdx") - implementation "com.badlogicgames.gdx:gdx:$libgdxVersion" - implementation "com.badlogicgames.gdx:gdx-platform:$libgdxVersion:natives-desktop" - implementation "com.badlogicgames.gdx:gdx-backend-lwjgl3:$libgdxVersion" - implementation "com.badlogicgames.gdx:gdx-box2d:$libgdxVersion" - implementation "com.badlogicgames.gdx:gdx-box2d-platform:$libgdxVersion:natives-desktop" - } + dependencies { + implementation project(":spine-libgdx") + implementation "com.badlogicgames.gdx:gdx:$libgdxVersion" + implementation "com.badlogicgames.gdx:gdx-platform:$libgdxVersion:natives-desktop" + implementation "com.badlogicgames.gdx:gdx-backend-lwjgl3:$libgdxVersion" + implementation "com.badlogicgames.gdx:gdx-box2d:$libgdxVersion" + implementation "com.badlogicgames.gdx:gdx-box2d-platform:$libgdxVersion:natives-desktop" + } } tasks.withType(JavaCompile).configureEach { - println "Building with sourceCompatibility = ${sourceCompatibility}, targetCompatibility = ${targetCompatibility}" + println "Building with sourceCompatibility = ${sourceCompatibility}, targetCompatibility = ${targetCompatibility}" } diff --git a/spine-libgdx/publishing.gradle b/spine-libgdx/publishing.gradle index d0fc1bb75..23e2d9dfd 100644 --- a/spine-libgdx/publishing.gradle +++ b/spine-libgdx/publishing.gradle @@ -1,89 +1,89 @@ ext { - libraryVersion = "4.2.9-SNAPSHOT" + libraryVersion = "4.2.9-SNAPSHOT" } project("spine-libgdx") { - apply plugin: "java-library" - apply plugin: "maven-publish" - apply plugin: "signing" + apply plugin: "java-library" + apply plugin: "maven-publish" + apply plugin: "signing" - dependencies { - implementation "com.badlogicgames.gdx:gdx:$libgdxVersion" - } + dependencies { + implementation "com.badlogicgames.gdx:gdx:$libgdxVersion" + } - tasks.register("sourceJar", Jar) { - archiveClassifier.set("sources") - from(sourceSets.main.allJava) - } + tasks.register("sourceJar", Jar) { + archiveClassifier.set("sources") + from(sourceSets.main.allJava) + } - tasks.javadoc { - failOnError = false - } + tasks.javadoc { + failOnError = false + } - tasks.register("javadocJar", Jar) { - dependsOn javadoc - archiveClassifier.set("javadoc") - from(javadoc.destinationDir) - } + tasks.register("javadocJar", Jar) { + dependsOn javadoc + archiveClassifier.set("javadoc") + from(javadoc.destinationDir) + } - afterEvaluate { - publishing { - publications { - create("release", MavenPublication) { - from(components.java) - artifact(tasks.getByName("sourceJar")) - artifact(tasks.getByName("javadocJar")) + afterEvaluate { + publishing { + publications { + create("release", MavenPublication) { + from(components.java) + artifact(tasks.getByName("sourceJar")) + artifact(tasks.getByName("javadocJar")) - groupId = "com.esotericsoftware.spine" - artifactId = "spine-libgdx" - version = libraryVersion + groupId = "com.esotericsoftware.spine" + artifactId = "spine-libgdx" + version = libraryVersion - pom { - packaging = "jar" - name.set("spine-libgdx") - description.set("Spine Runtime for libGDX") - url.set("https://github.com/esotericsoftware/spine-runtimes") - licenses { - license { - name.set("Spine Runtimes License") - url.set("https://esotericsoftware.com/spine-runtimes-license") - } - } - developers { - developer { - name.set("Esoteric Software") - email.set("contact@esotericsoftware.com") - } - } - scm { - url.set(pom.url.get()) - connection.set("scm:git:${url.get()}.git") - developerConnection.set("scm:git:${url.get()}.git") - } - } - } - } + pom { + packaging = "jar" + name.set("spine-libgdx") + description.set("Spine Runtime for libGDX") + url.set("https://github.com/esotericsoftware/spine-runtimes") + licenses { + license { + name.set("Spine Runtimes License") + url.set("https://esotericsoftware.com/spine-runtimes-license") + } + } + developers { + developer { + name.set("Esoteric Software") + email.set("contact@esotericsoftware.com") + } + } + scm { + url.set(pom.url.get()) + connection.set("scm:git:${url.get()}.git") + developerConnection.set("scm:git:${url.get()}.git") + } + } + } + } - repositories { - maven { - name = "SonaType" - url = uri(libraryVersion.endsWith("-SNAPSHOT") ? - "https://oss.sonatype.org/content/repositories/snapshots" : - "https://oss.sonatype.org/service/local/staging/deploy/maven2") + repositories { + maven { + name = "SonaType" + url = uri(libraryVersion.endsWith("-SNAPSHOT") ? + "https://oss.sonatype.org/content/repositories/snapshots" : + "https://oss.sonatype.org/service/local/staging/deploy/maven2") - credentials { - username = project.findProperty("ossrhUsername") - password = project.findProperty("ossrhPassword") - } - } - } - } + credentials { + username = project.findProperty("ossrhUsername") + password = project.findProperty("ossrhPassword") + } + } + } + } - if (!libraryVersion.endsWith("-SNAPSHOT")) { - signing { - useGpgCmd() - sign(publishing.publications["release"]) - } - } - } + if (!libraryVersion.endsWith("-SNAPSHOT")) { + signing { + useGpgCmd() + sign(publishing.publications["release"]) + } + } + } } diff --git a/spine-libgdx/spine-libgdx/pom.xml b/spine-libgdx/spine-libgdx/pom.xml index 4df1aecb4..23633c276 100644 --- a/spine-libgdx/spine-libgdx/pom.xml +++ b/spine-libgdx/spine-libgdx/pom.xml @@ -76,8 +76,8 @@ maven-compiler-plugin 3.1 - 1.7 - 1.7 + 16 + 16 true true