diff --git a/google-services-plugin/README.md b/google-services-plugin/README.md index d46e9b8e..98e0fbda 100755 --- a/google-services-plugin/README.md +++ b/google-services-plugin/README.md @@ -8,7 +8,7 @@ This plugin converts the google-services.json file for Firebase into a set of re Add the following to your project's settings.gradle: -``` +```gradle.kts pluginManagement { repositories { gradlePluginPortal() @@ -19,14 +19,14 @@ pluginManagement { Apply the plugin in your app's build.gradle.kts: -``` +```gradle.kts plugins { id("com.google.gms.google-services") version "4.4.1" } ``` Or in build.gradle: -``` +```gradle plugins { id 'com.google.gms.google-services' version '4.4.1' } @@ -54,7 +54,7 @@ contain an `applicationId`. Configure the plugin's behavior through the `googleServices` block in build.gradle.kts: -``` +```gradle.kts googleServices { // Disables checking of Google Play Services dependencies compatibility // Default: false @@ -81,13 +81,13 @@ The Google Services plugin requires AGP 7.3.0 or newer to work. Add the following to your buildscript classpath, obtained from Google’s [Maven repository](//developer.android.com/studio/build/dependencies#google-maven): -``` +```gradle classpath 'com.google.gms:google-services:4.4.1' ``` Apply the plugin in your app's build.gradle: -``` +```gradle apply plugin: 'com.google.gms.google-services' ``` diff --git a/oss-licenses-plugin/README.md b/oss-licenses-plugin/README.md index 6de6b5a1..498faef1 100755 --- a/oss-licenses-plugin/README.md +++ b/oss-licenses-plugin/README.md @@ -25,26 +25,32 @@ play-services-oss-licenses library. In your root-level `settings.gradle.kts` make sure you are using the [Google Maven repository](https://developer.android.com/studio/build/dependencies#google-maven): - pluginManagement { - repositories { +```gradle.kts +pluginManagement { + repositories { google() - } } +} +``` In your app-level `build.gradle.kts`, apply the plugin by adding the following line under the existing `id("com.android.application")` at the top of the file: - apply { - id("com.google.android.gms.oss-licenses-plugin") version("0.10.7") - } +```gradle.kts +plugins { + id("com.google.android.gms.oss-licenses-plugin") version "0.10.7" +} +``` ### Add the library to your app In the `dependencies` section of your app-level `build.gradle.kts`, add a dependency on the `oss-licenses` library: - implementation("com.google.android.gms:play-services-oss-licenses:17.0.0") +```gradle.kts +implementation("com.google.android.gms:play-services-oss-licenses:17.0.0") +``` ### Displaying license information @@ -53,12 +59,14 @@ add them to the app resources. To easily display them you can trigger an activity provided by the `play-services-oss-licenses` library at an appropriate point in your app: - import com.google.android.gms.oss.licenses.OssLicensesMenuActivity; +```java +import com.google.android.gms.oss.licenses.OssLicensesMenuActivity; - // ... +// ... - // When the user selects an option to see the licenses: - startActivity(new Intent(this, OssLicensesMenuActivity.class)); +// When the user selects an option to see the licenses: +startActivity(new Intent(this, OssLicensesMenuActivity.class)); +``` This will display a list of open source libraries that are compiled into the app, whether part of Google Play services or not. Tapping the library name will @@ -68,4 +76,6 @@ display additional license information for that library. You can also set the title of the displayed activity: - OssLicensesMenuActivity.setActivityTitle(getString(R.string.custom_license_title)); +```java +OssLicensesMenuActivity.setActivityTitle(getString(R.string.custom_license_title)); +``` diff --git a/strict-version-matcher-plugin/README.md b/strict-version-matcher-plugin/README.md index e5cead07..2a1f7886 100755 --- a/strict-version-matcher-plugin/README.md +++ b/strict-version-matcher-plugin/README.md @@ -10,7 +10,7 @@ highest referenced version even if it crossed the major version boundary. In your app's build.gradle: -``` +```gradle apply plugin: 'com.google.android.gms.strict-version-matcher-plugin' ``` @@ -18,7 +18,7 @@ In order to use this plugin, you will also need to add the following to your buildscript classpath, obtained from Google’s [Maven repository](//developer.android.com/studio/build/dependencies#google-maven): -``` +```gradle classpath 'com.google.android.gms:strict-version-matcher-plugin:1.0.2' ```