|
@@ -1,5 +1,6 @@
|
|
|
plugins {
|
|
|
alias(libs.plugins.androidLibrary)
|
|
|
+ `maven-publish`
|
|
|
}
|
|
|
|
|
|
android {
|
|
@@ -29,7 +30,6 @@ android {
|
|
|
}
|
|
|
|
|
|
dependencies {
|
|
|
-
|
|
|
implementation(libs.androidx.appcompat)
|
|
|
api("com.badlogicgames.gdx:gdx:1.12.2-SNAPSHOT")
|
|
|
api("com.esotericsoftware.spine:spine-libgdx:4.2.0")
|
|
@@ -37,4 +37,39 @@ dependencies {
|
|
|
testImplementation(libs.junit)
|
|
|
androidTestImplementation(libs.androidx.junit)
|
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+afterEvaluate {
|
|
|
+ publishing {
|
|
|
+ publications {
|
|
|
+ create<MavenPublication>("spine-android") {
|
|
|
+ groupId = "com.esotericsoftware"
|
|
|
+ artifactId = "spine-android"
|
|
|
+ version = "4.2"
|
|
|
+ artifact(tasks.getByName("bundleReleaseAar"))
|
|
|
+
|
|
|
+ pom {
|
|
|
+ withXml {
|
|
|
+ val dependenciesNode = asNode().appendNode("dependencies")
|
|
|
+ configurations.api.get().dependencies.forEach { dependency ->
|
|
|
+ dependenciesNode.appendNode("dependency").apply {
|
|
|
+ appendNode("groupId", dependency.group)
|
|
|
+ appendNode("artifactId", dependency.name)
|
|
|
+ appendNode("version", dependency.version)
|
|
|
+ appendNode("scope", "compile")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ configurations.implementation.get().dependencies.forEach { dependency ->
|
|
|
+ dependenciesNode.appendNode("dependency").apply {
|
|
|
+ appendNode("groupId", dependency.group)
|
|
|
+ appendNode("artifactId", dependency.name)
|
|
|
+ appendNode("version", dependency.version)
|
|
|
+ appendNode("scope", "runtime")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|