Skip to content

Commit

Permalink
🔧 Fix publishing configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxr1998 committed Dec 18, 2022
1 parent bf17dc3 commit c97276c
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,15 @@ if (propFile.exists()) {
// Maven publishing config
publishing {
publications {
register("production", MavenPublication::class) {
register<MavenPublication>("production") {
groupId = libraryGroup
artifactId = libraryName
version = libraryVersion
artifact("$buildDir/outputs/aar/library-release.aar")

afterEvaluate {
from(components["release"])
}

artifact(sourcesJar.get())

pom {
Expand All @@ -130,22 +134,14 @@ publishing {
developer {
id.set("Maxr1998")
name.set("Max Rumpf")
url.set("https://github.com/Maxr1998")
}
}
scm {
connection.set("scm:git:github.com/Maxr1998/ModernAndroidPreferences.git")
developerConnection.set("scm:git:ssh://github.com/Maxr1998/ModernAndroidPreferences.git")
url.set("https://github.com/Maxr1998/ModernAndroidPreferences/tree/master")
}
withXml {
val dependenciesNode = asNode().appendNode("dependencies")
configurations.implementation.get().allDependencies.forEach {
val dependencyNode = dependenciesNode.appendNode("dependency")
dependencyNode.appendNode("groupId", it.group)
dependencyNode.appendNode("artifactId", it.name)
dependencyNode.appendNode("version", it.version)
}
}
}
}
}
Expand Down

0 comments on commit c97276c

Please sign in to comment.