diff --git a/spine-libgdx/build.gradle b/spine-libgdx/build.gradle index 9312019af..c9d4b93cd 100644 --- a/spine-libgdx/build.gradle +++ b/spine-libgdx/build.gradle @@ -1,9 +1,5 @@ -group = "com.esotericsoftware.spine" -version = "4.2.0" - ext { libgdxVersion = "1.12.2-SNAPSHOT" - javaVersion = 8 } allprojects { @@ -17,9 +13,11 @@ allprojects { mavenCentral() } - tasks.withType(JavaCompile) { - sourceCompatibility = javaVersion.toString() - targetCompatibility = javaVersion.toString() + // Set Java 8 compatibility using JDK 17 + tasks.withType(JavaCompile).configureEach { + sourceCompatibility = '1.7' + targetCompatibility = '1.7' + options.release.set(7) // Ensures Java 8 bytecode is produced } } @@ -46,6 +44,10 @@ project("spine-skeletonviewer") { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } } + + tasks.named('jar').configure { + dependsOn(project(":spine-libgdx").tasks.named('jar')) + } } configure(subprojects - project("spine-libgdx")) { @@ -60,4 +62,8 @@ configure(subprojects - project("spine-libgdx")) { implementation "com.badlogicgames.gdx:gdx-box2d:$libgdxVersion" implementation "com.badlogicgames.gdx:gdx-box2d-platform:$libgdxVersion:natives-desktop" } -} \ No newline at end of file +} + +tasks.withType(JavaCompile).configureEach { + println "Building with sourceCompatibility = ${sourceCompatibility}, targetCompatibility = ${targetCompatibility}" +} diff --git a/spine-libgdx/publish.sh b/spine-libgdx/publish.sh index b3cd99758..280b33467 100755 --- a/spine-libgdx/publish.sh +++ b/spine-libgdx/publish.sh @@ -11,4 +11,4 @@ # After publishing via this script, log into https://oss.sonatype.org and release it manually after # checks pass ("Close -> Release & Drop"). set -e - ./gradlew publishReleasePublicationToSonaTypeRepository --info \ No newline at end of file +./gradlew publishReleasePublicationToSonaTypeRepository \ No newline at end of file diff --git a/spine-libgdx/publishing.gradle b/spine-libgdx/publishing.gradle index c65bdf865..d0ea642bb 100644 --- a/spine-libgdx/publishing.gradle +++ b/spine-libgdx/publishing.gradle @@ -1,10 +1,12 @@ +ext { + libraryVersion = "4.2.7-SNAPSHOT" +} + project("spine-libgdx") { apply plugin: "java-library" apply plugin: "maven-publish" apply plugin: "signing" - def libraryVersion = "4.2.7-SNAPSHOT" - dependencies { implementation "com.badlogicgames.gdx:gdx:$libgdxVersion" }