mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
85 lines
2.4 KiB
Groovy
85 lines
2.4 KiB
Groovy
ext {
|
|
libgdxVersion = "1.12.2-SNAPSHOT"
|
|
}
|
|
|
|
allprojects {
|
|
apply plugin: "java"
|
|
|
|
sourceSets.main.java.srcDirs = ["src"]
|
|
|
|
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
|
|
}
|
|
}
|
|
|
|
project("spine-libgdx") {
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation "com.badlogicgames.gdx:gdx:$libgdxVersion"
|
|
}
|
|
}
|
|
apply from: 'publishing.gradle'
|
|
|
|
project("spine-skeletonviewer") {
|
|
jar {
|
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
|
|
|
manifest {
|
|
attributes "Main-Class": "com.esotericsoftware.spine.SkeletonViewer"
|
|
}
|
|
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
|
|
dependsOn(project(":spine-libgdx").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
|
|
}
|
|
}
|
|
|
|
configure(subprojects - project("spine-libgdx")) {
|
|
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"
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
println "Building with sourceCompatibility = ${sourceCompatibility}, targetCompatibility = ${targetCompatibility}"
|
|
}
|