mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
Publish to local maven repo
This commit is contained in:
parent
7fa52fc849
commit
840c838666
@ -71,4 +71,6 @@ dependencies {
|
||||
debugImplementation(libs.androidx.ui.test.manifest)
|
||||
|
||||
implementation(project(":spine-android"))
|
||||
// Run `./gradlew publishToMavenLocal` in `spine-android` to use from local maven repo.
|
||||
// implementation("com.esotericsoftware:spine-android:4.2")
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ dependencyResolutionManagement {
|
||||
maven {
|
||||
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
}
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user