Skip to content

A collection of UI libraries and a parser for third-party licenses generated by the OSS Licenses Gradle Plugin.

License

Notifications You must be signed in to change notification settings

droibit/oss-licenses-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSS Licenses for Android

Android CI Software License

A collection of UI libraries and a parser for displaying open-source licenses in Android applications.
Built with Jetpack Compose and compatible with the OSS Licenses Gradle Plugin.

Overview

This library provides several modules to help you display open-source licenses in your applications:

Each module can be used independently based on your app's needs.

Installation

Add OSS Licenses Gradle Plugin

First, add the OSS Licenses Gradle Plugin to your project by following the official documentation.

This plugin is required to generate the license information that this library will display.

Add the library to your app

Add the following code to your build.gradle.

repositories {
  mavenCentral()
}

dependencies {
  // For apps using `androidx.compose.material3:material3`
  implementation("io.github.droibit.oss-licenses-android:ui-compose-material3:0.7.0")

  // UI components for Wear OS apps
  // If using `androidx.wear.compose:compose-material`
  implementation("io.github.droibit.oss-licenses-android:ui-wear-compose-material:0.7.0")
  // or
  // If using `androidx.wear.compose:compose-material3`
  implementation("io.github.droibit.oss-licenses-android:ui-wear-compose-material3:0.7.0")

  // For custom implementations, use only the parser
  implementation("io.github.droibit.oss-licenses-android:parser:0.7.0")
}

Usage

Mobile Apps

Launch the license screen in mobile apps using Compose Material 3:

import com.github.droibit.oss_licenses.ui.compose.material3.OssLicensesActivity

startActivity(OssLicensesActivity.createIntent(context))

Migrating from play-services-oss-licenses

If you're currently using the Google Play Services OSS Licenses library, you can migrate to this library by:

  1. Remove the dependency:
-implementation 'com.google.android.gms:play-services-oss-licenses'
  1. Update your code to use the new Activity:
-import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
+import com.github.droibit.oss_licenses.ui.compose.material3.OssLicensesActivity

-startActivity(Intent(context, OssLicensesMenuActivity::class.java));
+startActivity(OssLicensesActivity.createIntent(context))

Wear OS Apps

Launch the license screen in Wear OS apps using your preferred design system:

Tip

The WearableOssLicensesActivity supports the com.google.android.gms.oss.licenses.ACTION_SHOW_LICENSE intent action, allowing it to be launched from the app info screen on some modern Wear OS devices.

Using Material Design

Use the Wear Compose implementation:

import com.github.droibit.oss_licenses.ui.wear.compose.material.WearableOssLicensesActivity

startActivity(WearableOssLicensesActivity.createIntent(context))

Using Material Design 3

Use the Wear Compose Material3 implementation:

import com.github.droibit.oss_licenses.ui.wear.compose.material3.WearableOssLicensesActivity

startActivity(WearableOssLicensesActivity.createIntent(context))

Contributions

Contributions are welcome! Please feel free to submit a Pull Request.
Also check out our development guide for details on building and testing the project.

License

Copyright (C) 2018 Shinya Kumagai

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

A collection of UI libraries and a parser for third-party licenses generated by the OSS Licenses Gradle Plugin.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages