diff --git a/oss-licenses-plugin/README.md b/oss-licenses-plugin/README.md index f7f82c5..9b7f776 100755 --- a/oss-licenses-plugin/README.md +++ b/oss-licenses-plugin/README.md @@ -18,64 +18,10 @@ The plugin will generate two text files based on the gathered licenses info: and registers them as raw resources so that it can be consumed by the play-services-oss-licenses library. -## To Use +For detailed instructions on how to add the plugin to your project, configure dependencies, and display license information using the SDK, please refer to the official documentation: -### Add the Gradle plugin +👉 **[Include open source notices](https://developers.google.com/android/guides/opensource)** -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): +## Source Code and Contributing -```kotlin -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: - -```kotlin -plugins { - id("com.google.android.gms.oss-licenses-plugin") version "0.11.0" -} -``` - -### 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: - -```kotlin -implementation("com.google.android.gms:play-services-oss-licenses:17.0.0") -``` - -### Displaying license information - -When the application builds, the Gradle plugin will process the licenses and -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: - -```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)); -``` - -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 -display additional license information for that library. - -### Setting the `Activity` title - -You can also set the title of the displayed activity: - -```java -OssLicensesMenuActivity.setActivityTitle(getString(R.string.custom_license_title)); -``` +The source code for this plugin is hosted in this repository. For contributing guidelines or to report issues, please see the root project documentation.