Skip to content

Commit

Permalink
chore: fix publish command (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso authored Jan 21, 2025
1 parent d437db4 commit a7464a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ class PublishingConventionPlugin : Plugin<Project> {
extensions.configure<PublishingExtension> {
publications {
create<MavenPublication>("aar") {
artifactId = if (project.name == "library") {
"android-maps-utils"
} else {
null
}

afterEvaluate {
from(components["release"])
}
Expand Down Expand Up @@ -104,9 +110,13 @@ class PublishingConventionPlugin : Plugin<Project> {
}
repositories {
maven {
val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
url = if (project.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
val releasesRepoUrl =
uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl =
uri("https://oss.sonatype.org/content/repositories/snapshots/")
url = if (project.version.toString()
.endsWith("SNAPSHOT")
) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = project.findProperty("sonatypeToken") as String?
password = project.findProperty("sonatypeTokenPassword") as String?
Expand Down
6 changes: 0 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,7 @@ tasks.register<Delete>("clean") {
delete(rootProject.buildDir)
}


allprojects {
group = "com.google.maps.android"
version = "3.10.0"
val projectArtifactId = if (project.name == "library") {
"android-maps-utils"
} else {
null
}
}

0 comments on commit a7464a7

Please sign in to comment.