Skip to content

Commit

Permalink
chore(docs): update secrets-gradle-plugin install snippets (#1353)
Browse files Browse the repository at this point in the history
* chore(docs): update secrets-gradle-plugin install snippets

* chore: align snippets build versions for compatibility

* chore: update build snippets test to use Java 17

* chore: add snippet-bot config
  • Loading branch information
wangela authored Oct 17, 2023
1 parent 5d30d65 commit ff1b2de
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
Empty file added .github/snippet-bot.yml
Empty file.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: set up Java 11
- name: set up Java 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'

- name: Uninstall NDK
run: |
Expand Down Expand Up @@ -123,5 +123,5 @@ jobs:
- build-WearOS
- build-Snippets
- build-tutorials
steps:
- run: echo "Fail if all other steps are not successful"
steps:
- run: echo "Fail if all other steps are not successful"
12 changes: 7 additions & 5 deletions snippets/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// [START maps_android_secrets_gradle_plugin]
plugins {
// [START_EXCLUDE]
id 'com.android.application'
id 'kotlin-android'
// [START maps_android_secrets_gradle_plugin]
// [END_EXCLUDE]
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
// [END maps_android_secrets_gradle_plugin]
}
// [END maps_android_secrets_gradle_plugin]

android {
compileSdk 33
Expand All @@ -25,7 +27,7 @@ android {
}

composeOptions {
kotlinCompilerExtensionVersion '1.4.2'
kotlinCompilerExtensionVersion '1.5.0'
}

buildFeatures {
Expand All @@ -47,8 +49,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
namespace 'com.google.maps.example'
}
Expand Down
13 changes: 8 additions & 5 deletions snippets/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// [START maps_android_secrets_gradle_plugin_project_level_config]
buildscript {
dependencies {
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
}
}
// [END maps_android_secrets_gradle_plugin_project_level_config]

plugins {
// [START_EXCLUDE]
id 'com.android.application' version '7.4.1' apply false
id 'com.android.application' version '8.1.0' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
// [END_EXCLUDE]
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1' apply false
}
// [END maps_android_secrets_gradle_plugin_project_level_config]

task clean(type: Delete) {
delete rootProject.buildDir
Expand Down
6 changes: 3 additions & 3 deletions snippets/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Mar 21 15:55:38 PDT 2022
#Mon Oct 16 15:40:50 PDT 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit ff1b2de

Please sign in to comment.