Skip to content

Commit 7b2e118

Browse files
docs: Consolidate syntax highlighting and update versions (#373)
* Fix typo and use language-based markdown code blocks * Update README.md * Update README.md * Update README.md * docs: Consolidate syntax highlighting and update versions --------- Co-authored-by: Róbert Papp <papp.robert.s@gmail.com>
1 parent dc6599f commit 7b2e118

3 files changed

Lines changed: 34 additions & 24 deletions

File tree

google-services-plugin/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This plugin converts the google-services.json file for Firebase into a set of re
88

99
Add the following to your project's settings.gradle:
1010

11-
```
11+
```kotlin
1212
pluginManagement {
1313
repositories {
1414
gradlePluginPortal()
@@ -19,16 +19,16 @@ pluginManagement {
1919

2020
Apply the plugin in your app's build.gradle.kts:
2121

22-
```
22+
```kotlin
2323
plugins {
24-
id("com.google.gms.google-services") version "4.4.1"
24+
id("com.google.gms.google-services") version "4.4.4"
2525
}
2626
```
2727

2828
Or in build.gradle:
29-
```
29+
```gradle
3030
plugins {
31-
id 'com.google.gms.google-services' version '4.4.1'
31+
id 'com.google.gms.google-services' version '4.4.4'
3232
}
3333
```
3434

@@ -54,7 +54,7 @@ contain an `applicationId`.
5454

5555
Configure the plugin's behavior through the `googleServices` block in build.gradle.kts:
5656

57-
```
57+
```kotlin
5858
googleServices {
5959
// Disables checking of Google Play Services dependencies compatibility
6060
// Default: false
@@ -81,13 +81,13 @@ The Google Services plugin requires AGP 7.3.0 or newer to work.
8181
Add the following to your buildscript classpath, obtained from Google’s
8282
[Maven repository](//developer.android.com/studio/build/dependencies#google-maven):
8383

84-
```
85-
classpath 'com.google.gms:google-services:4.4.1'
84+
```gradle
85+
classpath 'com.google.gms:google-services:4.4.4'
8686
```
8787

8888
Apply the plugin in your app's build.gradle:
8989

90-
```
90+
```gradle
9191
apply plugin: 'com.google.gms.google-services'
9292
```
9393

oss-licenses-plugin/README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,32 @@ play-services-oss-licenses library.
2525
In your root-level `settings.gradle.kts` make sure you are using the
2626
[Google Maven repository](https://developer.android.com/studio/build/dependencies#google-maven):
2727

28-
pluginManagement {
29-
repositories {
28+
```kotlin
29+
pluginManagement {
30+
repositories {
3031
google()
31-
}
3232
}
33+
}
34+
```
3335

3436
In your app-level `build.gradle.kts`, apply the plugin by adding the following line
3537
under the existing `id("com.android.application")` at the top of the
3638
file:
3739

38-
apply {
39-
id("com.google.android.gms.oss-licenses-plugin") version("0.10.7")
40-
}
40+
```kotlin
41+
plugins {
42+
id("com.google.android.gms.oss-licenses-plugin") version "0.11.0"
43+
}
44+
```
4145

4246
### Add the library to your app
4347

4448
In the `dependencies` section of your app-level `build.gradle.kts`, add a dependency
4549
on the `oss-licenses` library:
4650

47-
implementation("com.google.android.gms:play-services-oss-licenses:17.0.0")
51+
```kotlin
52+
implementation("com.google.android.gms:play-services-oss-licenses:17.0.0")
53+
```
4854

4955
### Displaying license information
5056

@@ -53,12 +59,14 @@ add them to the app resources. To easily display them you can trigger an
5359
activity provided by the `play-services-oss-licenses` library at an appropriate
5460
point in your app:
5561

56-
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity;
62+
```java
63+
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity;
5764

58-
// ...
65+
// ...
5966

60-
// When the user selects an option to see the licenses:
61-
startActivity(new Intent(this, OssLicensesMenuActivity.class));
67+
// When the user selects an option to see the licenses:
68+
startActivity(new Intent(this, OssLicensesMenuActivity.class));
69+
```
6270

6371
This will display a list of open source libraries that are compiled into the
6472
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.
6876

6977
You can also set the title of the displayed activity:
7078

71-
OssLicensesMenuActivity.setActivityTitle(getString(R.string.custom_license_title));
79+
```java
80+
OssLicensesMenuActivity.setActivityTitle(getString(R.string.custom_license_title));
81+
```

strict-version-matcher-plugin/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ highest referenced version even if it crossed the major version boundary.
1010

1111
In your app's build.gradle:
1212

13-
```
13+
```gradle
1414
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
1515
```
1616

1717
In order to use this plugin, you will also need to add the following to your
1818
buildscript classpath, obtained from Google’s
1919
[Maven repository](//developer.android.com/studio/build/dependencies#google-maven):
2020

21-
```
22-
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.0.2'
21+
```gradle
22+
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'
2323
```
2424

2525
These instructions are also documented

0 commit comments

Comments
 (0)