From e257430d1edc9b0095031e40c94950a63f787f88 Mon Sep 17 00:00:00 2001 From: Chris Arriola Date: Wed, 9 Jun 2021 15:57:47 -0700 Subject: [PATCH] refactor!: Update group ID to 'com.google.android' (#19) --- .github/workflows/test.yml | 2 +- .releaserc | 10 +++++++--- README.md | 4 ++-- {plugin => secrets_gradle_plugin}/.gitignore | 0 {plugin => secrets_gradle_plugin}/build.gradle.kts | 6 +++--- .../android}/secrets_gradle_plugin/Extensions.kt | 2 +- .../android}/secrets_gradle_plugin/SecretsPlugin.kt | 2 +- .../secrets_gradle_plugin/SecretsPluginExtension.kt | 2 +- .../secrets_gradle_plugin/SecretsPluginTest.kt | 4 ++-- settings.gradle.kts | 2 +- 10 files changed, 19 insertions(+), 15 deletions(-) rename {plugin => secrets_gradle_plugin}/.gitignore (100%) rename {plugin => secrets_gradle_plugin}/build.gradle.kts (92%) rename {plugin/src/main/java/com/google => secrets_gradle_plugin/src/main/java/com/google/android}/secrets_gradle_plugin/Extensions.kt (98%) rename {plugin/src/main/java/com/google => secrets_gradle_plugin/src/main/java/com/google/android}/secrets_gradle_plugin/SecretsPlugin.kt (98%) rename {plugin/src/main/java/com/google => secrets_gradle_plugin/src/main/java/com/google/android}/secrets_gradle_plugin/SecretsPluginExtension.kt (96%) rename {plugin/src/test/kotlin/com/google => secrets_gradle_plugin/src/test/kotlin/com/google/android}/secrets_gradle_plugin/SecretsPluginTest.kt (97%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index adf98e0..3dcc98f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,4 +34,4 @@ jobs: - name: Run tests run: | echo "Running unit tests" - ./gradlew :plugin:build check test -x lint --stacktrace + ./gradlew :secrets_gradle_plugin:build check test -x lint --stacktrace diff --git a/.releaserc b/.releaserc index ac00e00..5f71b5a 100644 --- a/.releaserc +++ b/.releaserc @@ -6,19 +6,23 @@ plugins: - - "@google/semantic-release-replace-plugin" - replacements: - files: - - "./plugin/build.gradle.kts" + - "./secrets_gradle_plugin/build.gradle.kts" from: "const val version = \".*\"" to: "const val version = \"${nextRelease.version}\"" - files: - "README.md" - from: "version \"[0-9].[0-9]\"" + from: "version \".*\"" to: "version \"${nextRelease.version}\"" + - files: + - "README.md" + from: "version '.*'" + to: "version '${nextRelease.version}'" - - "@semantic-release/exec" - prepareCmd: "./gradlew build --warn --stacktrace" publishCmd: "./gradlew publishPlugins --warn --stacktrace" - - "@semantic-release/git" - assets: - - "./plugin/build.gradle.kts" + - "./secrets_gradle_plugin/build.gradle.kts" - "*.md" - "@semantic-release/github" options: diff --git a/README.md b/README.md index d48d5e2..28b71ef 100644 --- a/README.md +++ b/README.md @@ -21,14 +21,14 @@ In your app-level `build.gradle` file: Groovy: ```groovy plugins { - id 'com.google.secrets_gradle_plugin' version '0.6' + id 'com.google.android.secrets_gradle_plugin' version '1.0' } ``` Kotlin: ```groovy plugins { - id("com.google.secrets_gradle_plugin") version "0.6" + id("com.google.android.secrets_gradle_plugin") version "1.0" } ``` diff --git a/plugin/.gitignore b/secrets_gradle_plugin/.gitignore similarity index 100% rename from plugin/.gitignore rename to secrets_gradle_plugin/.gitignore diff --git a/plugin/build.gradle.kts b/secrets_gradle_plugin/build.gradle.kts similarity index 92% rename from plugin/build.gradle.kts rename to secrets_gradle_plugin/build.gradle.kts index 96dc260..10591d2 100644 --- a/plugin/build.gradle.kts +++ b/secrets_gradle_plugin/build.gradle.kts @@ -69,9 +69,9 @@ publishing { } object PluginInfo { - const val group = "com.google" + const val group = "com.google.android" const val artifactId = "secrets_gradle_plugin" const val name = "secretsGradlePlugin" - const val version = "0.6" - const val implementationClass = "com.google.secrets_gradle_plugin.SecretsPlugin" + const val version = "1.0" + const val implementationClass = "com.google.android.secrets_gradle_plugin.SecretsPlugin" } diff --git a/plugin/src/main/java/com/google/secrets_gradle_plugin/Extensions.kt b/secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/Extensions.kt similarity index 98% rename from plugin/src/main/java/com/google/secrets_gradle_plugin/Extensions.kt rename to secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/Extensions.kt index 26945d6..fe048b2 100644 --- a/plugin/src/main/java/com/google/secrets_gradle_plugin/Extensions.kt +++ b/secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/Extensions.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package com.google.secrets_gradle_plugin +package com.google.android.secrets_gradle_plugin import com.android.build.gradle.AppExtension import com.android.build.gradle.LibraryExtension diff --git a/plugin/src/main/java/com/google/secrets_gradle_plugin/SecretsPlugin.kt b/secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/SecretsPlugin.kt similarity index 98% rename from plugin/src/main/java/com/google/secrets_gradle_plugin/SecretsPlugin.kt rename to secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/SecretsPlugin.kt index 802a16b..5d17d04 100644 --- a/plugin/src/main/java/com/google/secrets_gradle_plugin/SecretsPlugin.kt +++ b/secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/SecretsPlugin.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package com.google.secrets_gradle_plugin +package com.google.android.secrets_gradle_plugin import com.android.build.gradle.internal.core.InternalBaseVariant import org.gradle.api.Plugin diff --git a/plugin/src/main/java/com/google/secrets_gradle_plugin/SecretsPluginExtension.kt b/secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/SecretsPluginExtension.kt similarity index 96% rename from plugin/src/main/java/com/google/secrets_gradle_plugin/SecretsPluginExtension.kt rename to secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/SecretsPluginExtension.kt index 6e1213b..77109c1 100644 --- a/plugin/src/main/java/com/google/secrets_gradle_plugin/SecretsPluginExtension.kt +++ b/secrets_gradle_plugin/src/main/java/com/google/android/secrets_gradle_plugin/SecretsPluginExtension.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package com.google.secrets_gradle_plugin +package com.google.android.secrets_gradle_plugin /** * Configuration object for [SecretsPlugin]. diff --git a/plugin/src/test/kotlin/com/google/secrets_gradle_plugin/SecretsPluginTest.kt b/secrets_gradle_plugin/src/test/kotlin/com/google/android/secrets_gradle_plugin/SecretsPluginTest.kt similarity index 97% rename from plugin/src/test/kotlin/com/google/secrets_gradle_plugin/SecretsPluginTest.kt rename to secrets_gradle_plugin/src/test/kotlin/com/google/android/secrets_gradle_plugin/SecretsPluginTest.kt index 2639748..86de9a1 100644 --- a/plugin/src/test/kotlin/com/google/secrets_gradle_plugin/SecretsPluginTest.kt +++ b/secrets_gradle_plugin/src/test/kotlin/com/google/android/secrets_gradle_plugin/SecretsPluginTest.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package com.google.secrets_gradle_plugin +package com.google.android.secrets_gradle_plugin import com.android.build.gradle.internal.core.InternalBaseVariant import com.nhaarman.mockitokotlin2.doReturn @@ -57,7 +57,7 @@ class SecretsPluginTest { variant = mock() { on { mergedFlavor } doReturn flavor } - project.pluginManager.apply("com.google.secrets_gradle_plugin") + project.pluginManager.apply("com.google.android.secrets_gradle_plugin") } @Test(expected = ProjectConfigurationException::class) diff --git a/settings.gradle.kts b/settings.gradle.kts index 20a7413..2c3dfda 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -include(":plugin", ":sample-app") +include(":secrets_gradle_plugin", ":sample-app") pluginManagement { repositories {