From 741aae85d949062732eb72ed945df736e1274a7f Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Thu, 17 Jun 2021 11:18:55 -0700 Subject: [PATCH 1/6] chore: Change artifact ID to com.google.android.libraries.mapsplatform.secrets-gradle-plugin.gradle.plugin --- README.md | 25 ++----------------- build.gradle | 1 - secrets-gradle-plugin/build.gradle.kts | 2 +- .../SecretsPluginTest.kt | 2 +- 4 files changed, 4 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 76f9fbc..b5433d1 100644 --- a/README.md +++ b/README.md @@ -16,30 +16,9 @@ class and in the Android manifest file. ## Installation -**NOTE**: Starting from v1.1.0, the maven coordinate of the plugin changed group ID to "com.google.android.libraries.mapsplatform.secrets-gradle-plugin" and artifact ID to "secrets-gradle-plugin" and is now being distributed via Google Maven (gMaven). You can still download previous versions of the plugin from Gradle's plugin portal, but new versions will now only be distributed through gMaven. +**NOTE**: Starting from v1.1.0, the plugin ID was changed to "com.google.android.libraries.mapsplatform.secrets-gradle-plugin" and the plugin is now being distributed via Google Maven (gMaven). You can still download previous versions of the plugin from Gradle's plugin portal, but new versions will now only be distributed through gMaven. -1. In your project's root `build.gradle` file: - -Groovy: -```groovy -buildscript { - dependencies { - classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.1.0" - } -} -``` - -Kotlin: -```kotlin -buildscript { - dependencies { - classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.1.0") - } -} -``` - - -2. In your app-level `build.gradle` file: +In your app-level `build.gradle` file: Groovy: ```groovy diff --git a/build.gradle b/build.gradle index 339c170..8e5be1f 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,6 @@ buildscript { dependencies { classpath "com.android.tools.build:gradle:4.1.3" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.1.0" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/secrets-gradle-plugin/build.gradle.kts b/secrets-gradle-plugin/build.gradle.kts index 81f4ed6..f90b21c 100644 --- a/secrets-gradle-plugin/build.gradle.kts +++ b/secrets-gradle-plugin/build.gradle.kts @@ -101,7 +101,7 @@ publishing { } object PluginInfo { - const val artifactId = "secrets-gradle-plugin" + const val artifactId = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin.gradle.plugin" const val description = "A Gradle plugin for providing secrets securely to an Android project." const val group = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin" const val implementationClass = "com.google.android.libraries.mapsplatform.secrets_gradle_plugin.SecretsPlugin" diff --git a/secrets-gradle-plugin/src/test/kotlin/com/google/android/libraries/mapsplatform/secrets_gradle_plugin/SecretsPluginTest.kt b/secrets-gradle-plugin/src/test/kotlin/com/google/android/libraries/mapsplatform/secrets_gradle_plugin/SecretsPluginTest.kt index c0572ac..05401db 100644 --- a/secrets-gradle-plugin/src/test/kotlin/com/google/android/libraries/mapsplatform/secrets_gradle_plugin/SecretsPluginTest.kt +++ b/secrets-gradle-plugin/src/test/kotlin/com/google/android/libraries/mapsplatform/secrets_gradle_plugin/SecretsPluginTest.kt @@ -57,7 +57,7 @@ class SecretsPluginTest { variant = mock() { on { mergedFlavor } doReturn flavor } - project.pluginManager.apply("com.google.android.libraries.mapsplatform.secrets-gradle-plugin.secrets-gradle-plugin") + project.pluginManager.apply("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") } @Test(expected = ProjectConfigurationException::class) From f07d5196add4a3243e0f50156ad4c31c128b937c Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Thu, 17 Jun 2021 11:52:28 -0700 Subject: [PATCH 2/6] Use new way to include plugin. --- build.gradle | 2 +- sample-app/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 8e5be1f..0244a1e 100644 --- a/build.gradle +++ b/build.gradle @@ -23,4 +23,4 @@ allprojects { task clean(type: Delete) { delete rootProject.buildDir -} \ No newline at end of file +} diff --git a/sample-app/build.gradle.kts b/sample-app/build.gradle.kts index 7ae9751..102f73b 100644 --- a/sample-app/build.gradle.kts +++ b/sample-app/build.gradle.kts @@ -17,7 +17,7 @@ plugins { id("kotlin-android") // 1. Include the plugin - id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin.secrets-gradle-plugin") + id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") } android { From de14558de3dc70615c2942ad6d0ec71d163ea8f5 Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Thu, 17 Jun 2021 14:24:56 -0700 Subject: [PATCH 3/6] Updating plugin id --- sample-app/build.gradle.kts | 2 +- secrets-gradle-plugin/build.gradle.kts | 2 +- settings.gradle.kts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sample-app/build.gradle.kts b/sample-app/build.gradle.kts index 102f73b..6a737f8 100644 --- a/sample-app/build.gradle.kts +++ b/sample-app/build.gradle.kts @@ -17,7 +17,7 @@ plugins { id("kotlin-android") // 1. Include the plugin - id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") + id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "1.1.0" } android { diff --git a/secrets-gradle-plugin/build.gradle.kts b/secrets-gradle-plugin/build.gradle.kts index f90b21c..dc719eb 100644 --- a/secrets-gradle-plugin/build.gradle.kts +++ b/secrets-gradle-plugin/build.gradle.kts @@ -35,7 +35,7 @@ dependencies { gradlePlugin { plugins { create(PluginInfo.name) { - id = "${PluginInfo.group}.${PluginInfo.artifactId}" + id = PluginInfo.group implementationClass = PluginInfo.implementationClass } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 5afca0c..99451da 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -16,6 +16,7 @@ include(":secrets-gradle-plugin", ":sample-app") pluginManagement { repositories { + mavenLocal() maven(url = "./plugin/build/repository") gradlePluginPortal() } From 4a40065e8f3801c03f103eea32ae34c0709d2c3b Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Thu, 17 Jun 2021 15:01:05 -0700 Subject: [PATCH 4/6] chore: Version 1.2.0 --- secrets-gradle-plugin/build.gradle.kts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/secrets-gradle-plugin/build.gradle.kts b/secrets-gradle-plugin/build.gradle.kts index dc719eb..668f50b 100644 --- a/secrets-gradle-plugin/build.gradle.kts +++ b/secrets-gradle-plugin/build.gradle.kts @@ -37,6 +37,8 @@ gradlePlugin { create(PluginInfo.name) { id = PluginInfo.group implementationClass = PluginInfo.implementationClass + displayName = PluginInfo.displayName + description = PluginInfo.description } } } @@ -49,7 +51,7 @@ pluginBundle { (plugins) { PluginInfo.name { - displayName = "Secrets Gradle Plugin for Android" + displayName = PluginInfo.displayName tags = listOf("kotlin", "android") } } @@ -97,15 +99,17 @@ publishing { } repositories { maven(url = "build/repository") + mavenLocal() } } object PluginInfo { const val artifactId = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin.gradle.plugin" const val description = "A Gradle plugin for providing secrets securely to an Android project." + const val displayName = "Secrets Gradle Plugin for Android" const val group = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin" const val implementationClass = "com.google.android.libraries.mapsplatform.secrets_gradle_plugin.SecretsPlugin" const val name = "secretsGradlePlugin" const val url = "https://github.com/google/secrets-gradle-plugin" - const val version = "1.1.0" + const val version = "1.2.0" } From 67834d0558856040007adcc39b7adddb0287e2e7 Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Thu, 17 Jun 2021 15:02:11 -0700 Subject: [PATCH 5/6] Update to version 1.2.0 on sample app. --- README.md | 4 ++-- sample-app/build.gradle.kts | 2 +- settings.gradle.kts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b5433d1..294fe93 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,14 @@ In your app-level `build.gradle` file: Groovy: ```groovy plugins { - id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' + id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '1.2.0' } ``` Kotlin: ```groovy plugins { - id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") + id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "1.2.0" } ``` diff --git a/sample-app/build.gradle.kts b/sample-app/build.gradle.kts index 6a737f8..afd60b8 100644 --- a/sample-app/build.gradle.kts +++ b/sample-app/build.gradle.kts @@ -17,7 +17,7 @@ plugins { id("kotlin-android") // 1. Include the plugin - id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "1.1.0" + id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "1.2.0" } android { diff --git a/settings.gradle.kts b/settings.gradle.kts index 99451da..1f1ff65 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -18,6 +18,6 @@ pluginManagement { repositories { mavenLocal() maven(url = "./plugin/build/repository") - gradlePluginPortal() + google() } } From 41eced8964cf65c535371b3fe3f4d6f4362f346f Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Fri, 18 Jun 2021 10:27:57 -0700 Subject: [PATCH 6/6] Specifying classpath. --- README.md | 26 +++++++++++++++++++++++--- build.gradle | 1 + sample-app/build.gradle.kts | 2 +- settings.gradle.kts | 2 +- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 294fe93..1e50f9e 100644 --- a/README.md +++ b/README.md @@ -18,19 +18,39 @@ class and in the Android manifest file. **NOTE**: Starting from v1.1.0, the plugin ID was changed to "com.google.android.libraries.mapsplatform.secrets-gradle-plugin" and the plugin is now being distributed via Google Maven (gMaven). You can still download previous versions of the plugin from Gradle's plugin portal, but new versions will now only be distributed through gMaven. -In your app-level `build.gradle` file: +1. In your project's root `build.gradle` file: + +Groovy: +```groovy +buildscript { + dependencies { + classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.2.0" + } +} +``` + +Kotlin: +```kotlin +buildscript { + dependencies { + classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.2.0") + } +} +``` + +2. In your app-level `build.gradle` file: Groovy: ```groovy plugins { - id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '1.2.0' + id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' } ``` Kotlin: ```groovy plugins { - id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "1.2.0" + id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") } ``` diff --git a/build.gradle b/build.gradle index 0244a1e..31d6f79 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,7 @@ buildscript { dependencies { classpath "com.android.tools.build:gradle:4.1.3" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.2.0" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/sample-app/build.gradle.kts b/sample-app/build.gradle.kts index afd60b8..102f73b 100644 --- a/sample-app/build.gradle.kts +++ b/sample-app/build.gradle.kts @@ -17,7 +17,7 @@ plugins { id("kotlin-android") // 1. Include the plugin - id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "1.2.0" + id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") } android { diff --git a/settings.gradle.kts b/settings.gradle.kts index 1f1ff65..99451da 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -18,6 +18,6 @@ pluginManagement { repositories { mavenLocal() maven(url = "./plugin/build/repository") - google() + gradlePluginPortal() } }