Skip to content

Commit

Permalink
chore: Release 2.0.0 (#38)
Browse files Browse the repository at this point in the history
* fix: Use AndroidComponentsExtension from com.android.build.api.variant package.

* chore: Adding GPR repo and 2.0.0-SNAPSHOT.

* chore: Using AGP 7.0.0 and bump version to 2.0.0

* Define required params in gradle.properties.
  • Loading branch information
arriolac committed Aug 9, 2021
1 parent 6c2b99e commit 2d2a5bf
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
.externalNativeBuild
.cxx
local.properties
.java-version
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class and in the Android manifest file.

## Requirements
* Gradle-based Android project
* Android Gradle plugin 4.2.x
* Android Gradle plugin 7.0.0

## Installation

Expand All @@ -24,7 +24,7 @@ Groovy:
```groovy
buildscript {
dependencies {
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.3.0"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.0"
}
}
```
Expand All @@ -33,7 +33,7 @@ Kotlin:
```kotlin
buildscript {
dependencies {
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.3.0")
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.0")
}
}
```
Expand Down
13 changes: 10 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.4.32"
ext.kotlin_version = "1.5.20"
repositories {
mavenLocal()
google()
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/google/secrets-gradle-plugin")
credentials {
username = project.findProperty("ghGprUser") ?: System.getenv("ghGprUser")
password = project.findProperty("ghGprToken") ?: System.getenv("ghGprToken")
}
}
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.1"
classpath "com.android.tools.build:gradle:7.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.3.0"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.0"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ android.enableJetifier=true
kotlin.code.style=official

gradle.publish.key=
gradle.publish.secret=
gradle.publish.secret=

ghGprUser=
ghGprToken=
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Nov 26 22:14:52 PST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
38 changes: 16 additions & 22 deletions secrets-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
plugins {
`java-gradle-plugin`
`maven-publish`
id("com.gradle.plugin-publish") version "0.12.0"
id("kotlin")
}

Expand All @@ -25,9 +24,9 @@ java {
}

dependencies {
compileOnly("com.android.tools.build:gradle:4.2.1")
compileOnly("com.android.tools.build:gradle:7.0.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10")
testImplementation("com.android.tools.build:gradle:4.2.1")
testImplementation("com.android.tools.build:gradle:7.0.0-beta04")
testImplementation("junit:junit:4.13.1")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
}
Expand All @@ -43,20 +42,6 @@ gradlePlugin {
}
}

pluginBundle {
website = PluginInfo.url
vcsUrl = PluginInfo.url
description = PluginInfo.description
version = PluginInfo.version

(plugins) {
PluginInfo.name {
displayName = PluginInfo.displayName
tags = listOf("kotlin", "android")
}
}
}

publishing {
publications {
create<MavenPublication>("mavenPub") {
Expand Down Expand Up @@ -98,18 +83,27 @@ publishing {
}
}
repositories {
maven(url = "build/repository")
maven {
name = "localPluginRepository"
url = uri("build/repository")
}
mavenLocal()
}
}

project(":secrets-gradle-plugin") {
version = PluginInfo.version
}

object PluginInfo {
const val artifactId = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin.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 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.3.0"
}
const val version = "2.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package com.google.android.libraries.mapsplatform.secrets_gradle_plugin

import com.android.build.api.extension.ApplicationAndroidComponentsExtension
import com.android.build.api.extension.LibraryAndroidComponentsExtension
import com.android.build.api.variant.ApplicationAndroidComponentsExtension
import com.android.build.api.variant.BuildConfigField
import com.android.build.api.variant.LibraryAndroidComponentsExtension
import com.android.build.api.variant.Variant
import com.android.build.gradle.AppExtension
import com.android.build.gradle.LibraryExtension
Expand Down

0 comments on commit 2d2a5bf

Please sign in to comment.