Skip to content

Commit

Permalink
Merge pull request #24 from google/chris/rename_artifact
Browse files Browse the repository at this point in the history
chore: Change artifact ID to com.google.android.libraries.mapsplatform.secrets-gradle-plugin.gradle.plugin
  • Loading branch information
arriolac authored Jun 18, 2021
2 parents 99169bb + 41eced8 commit 39f5976
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ 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"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.2.0"
}
}
```
Expand All @@ -33,12 +33,11 @@ Kotlin:
```kotlin
buildscript {
dependencies {
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.1.0")
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.2.0")
}
}
```


2. In your app-level `build.gradle` file:

Groovy:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +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.1.0"
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
Expand All @@ -24,4 +24,4 @@ allprojects {

task clean(type: Delete) {
delete rootProject.buildDir
}
}
2 changes: 1 addition & 1 deletion sample-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 8 additions & 4 deletions secrets-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ dependencies {
gradlePlugin {
plugins {
create(PluginInfo.name) {
id = "${PluginInfo.group}.${PluginInfo.artifactId}"
id = PluginInfo.group
implementationClass = PluginInfo.implementationClass
displayName = PluginInfo.displayName
description = PluginInfo.description
}
}
}
Expand All @@ -49,7 +51,7 @@ pluginBundle {

(plugins) {
PluginInfo.name {
displayName = "Secrets Gradle Plugin for Android"
displayName = PluginInfo.displayName
tags = listOf("kotlin", "android")
}
}
Expand Down Expand Up @@ -97,15 +99,17 @@ publishing {
}
repositories {
maven(url = "build/repository")
mavenLocal()
}
}

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 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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ include(":secrets-gradle-plugin", ":sample-app")

pluginManagement {
repositories {
mavenLocal()
maven(url = "./plugin/build/repository")
gradlePluginPortal()
}
Expand Down

0 comments on commit 39f5976

Please sign in to comment.