From a7464a71a911d2b8dd75064a2c925a2466a02862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20L=C3=B3pez=20Ma=C3=B1as?= Date: Wed, 22 Jan 2025 00:24:03 +0700 Subject: [PATCH] chore: fix publish command (#1450) --- .../main/kotlin/PublishingConventionPlugin.kt | 16 +++++++++++++--- build.gradle.kts | 6 ------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt b/build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt index 5d31916fe..2740add13 100644 --- a/build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt @@ -71,6 +71,12 @@ class PublishingConventionPlugin : Plugin { extensions.configure { publications { create("aar") { + artifactId = if (project.name == "library") { + "android-maps-utils" + } else { + null + } + afterEvaluate { from(components["release"]) } @@ -104,9 +110,13 @@ class PublishingConventionPlugin : Plugin { } 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? diff --git a/build.gradle.kts b/build.gradle.kts index 7b18408e1..c5ab32062 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,13 +35,7 @@ tasks.register("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 - } } \ No newline at end of file