Skip to content

Commit

Permalink
Wrapped publishing configuration in afterEvaluate to ensure component…
Browse files Browse the repository at this point in the history
…s are loaded.
  • Loading branch information
vsnappy1 committed Nov 1, 2024
1 parent 2bf9cae commit 31d57a0
Showing 1 changed file with 35 additions and 34 deletions.
69 changes: 35 additions & 34 deletions resourcemanager/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -253,45 +253,46 @@ tasks.register<Zip>("createBundle") {
}

/* ----------------- Maven Publish (Meta data) ----------------- */
afterEvaluate {
publishing {
publications {
create<MavenPublication>("java") {
from(components["java"])
groupId = "dev.randos"
artifactId = "resourcemanager"
version = "1.0.0"

val bundle = file(layout.buildDirectory.dir("zip/bundle.zip"))
artifact(bundle)

pom {
name = "${groupId}:${artifactId}"
description =
"An Android library that simplifies accessing Android resources (strings, colors, drawables, etc.) in both Android and non-Android components (e.g. ViewModel) using generated code."
url = "https://github.com/vsnappy1/ResourceManager"

publishing {
publications {
create<MavenPublication>("java") {
from(components["java"])
groupId = "dev.randos"
artifactId = "resourcemanager"
version = "1.0.0"

val bundle = file(layout.buildDirectory.dir("zip/bundle.zip"))
artifact(bundle)

pom {
name = "${groupId}:${artifactId}"
description =
"An Android library that simplifies accessing Android resources (strings, colors, drawables, etc.) in both Android and non-Android components (e.g. ViewModel) using generated code."
url = "https://github.com/vsnappy1/ResourceManager"

licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
}

developers {
developer {
name = "Vishal Kumar"
email = "[email protected]"
organization = "Randos"
organizationUrl = "https://www.randos.dev"
developers {
developer {
name = "Vishal Kumar"
email = "[email protected]"
organization = "Randos"
organizationUrl = "https://www.randos.dev"
}
}
}

scm {
connection = "scm:git:git://github.com/vsnappy1/ResourceManager.git"
developerConnection =
"scm:git:ssh://github.com/vsnappy1/ResourceManager.git"
url = "https://github.com/vsnappy1/ResourceManager"
scm {
connection = "scm:git:git://github.com/vsnappy1/ResourceManager.git"
developerConnection =
"scm:git:ssh://github.com/vsnappy1/ResourceManager.git"
url = "https://github.com/vsnappy1/ResourceManager"
}
}
}
}
Expand Down

0 comments on commit 31d57a0

Please sign in to comment.