-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e0b687
commit d814476
Showing
59 changed files
with
166 additions
and
1,385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,47 @@ | ||
# Gross | ||
# lincesee-for-android | ||
___ | ||
|
||
Gradle Open Source Software | ||
Turn raw [cashapp/licensee](https://github.com/cashapp/licensee) report into assets/Kotlin code that can be easily consumed from an Android app | ||
|
||
## Plugin can be found at: | ||
https://plugins.gradle.org/plugin/se.premex.gross | ||
### Installation | ||
|
||
### Getting started | ||
Gross uses the output of another plugin which figures out all your dependencies: https://github.com/cashapp/licensee | ||
Available on: | ||
|
||
Add licensee and gross to your root project / module. We need both mavenCentral and gradle plugin portal for plugin resolution: | ||
- [Gradle Plugin Portal](https://plugins.gradle.org/plugin/io.github.usefulness.licensee-for-android) | ||
- [Maven Central](https://mvnrepository.com/artifact/io.github.usefulness/licensee-for-android) | ||
|
||
settings.gradle.kts | ||
```kotlin | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
} | ||
} | ||
#### Apply the plugin | ||
|
||
dependencyResolutionManagement { | ||
repositories { | ||
mavenCentral() | ||
} | ||
```groovy | ||
plugins { | ||
id("app.cash.licensee") version "x.y.z" | ||
id("io.github.usefulness.licensee-for-android") version "{{version}}" | ||
} | ||
``` | ||
|
||
build.gradle.kts | ||
```kotlin | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath("app.cash.licensee:licensee-gradle-plugin:1.7.0") | ||
} | ||
} | ||
|
||
plugins { | ||
id("app.cash.licensee") | ||
id("se.premex.gross") version "0.1.0" | ||
### Features | ||
- Access licenses report directly by a generated Kotlin code (accessible via static `io.github.usefulness.licensee.Licensee` object) | ||
- Read _licensee_ report copied to projects assets directory in runtime (via `assetManager.open("licensee_artifacts.json")`) | ||
|
||
### Configuration | ||
|
||
Options can be configured in the `licenseeForAndroid` extension: | ||
|
||
```groovy | ||
licenseeForAndroid { | ||
enableKotlinCodeGeneration = false | ||
enableAndroidAssetGeneration = true | ||
androidAssetFileName = "licensee_artifacts.json" | ||
singularVariantName = null | ||
} | ||
``` | ||
|
||
### Gradle dsl: | ||
gross { | ||
enableKotlinCodeGeneration.set(true) | ||
enableAndroidAssetGeneration.set(true) | ||
} | ||
- `enableKotlinCodeGeneration` - Generates a static list of open source assets | ||
- `enableAndroidAssetGeneration` - Enable asset generation. Will copy licensee report to android asset directory making it available as `androidAssetFileName` | ||
- `androidAssetFileName` - The name of the asset file the licensee report gets copied to. | ||
- `singularVariantName` - The name of the build variant that all variants will use to have always the same licensed, regardless of app variant. (i.e. "productionRelease") | ||
|
||
## enableKotlinCodeGeneration | ||
Generates a static list of open source assets in Gross.artifacts. | ||
|
||
## enableAndroidAssetGeneration | ||
Saves licensee report as an android asset. Default name is 'artifacts.json' but can be configured | ||
using androidAssetFileName. Check out AssetLicenseParser for an example of how to consume the file. | ||
### Credits | ||
Huge thanks to [premex-ab/gross](https://github.com/premex-ab/gross) which this plugin forked from. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
app/src/androidTest/java/se/premex/gross/ExampleInstrumentedTest.kt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.