Skip to content

Commit

Permalink
Last cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski committed Nov 10, 2023
1 parent 3e0b687 commit d814476
Show file tree
Hide file tree
Showing 59 changed files with 166 additions and 1,385 deletions.
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ MIT License

Copyright (c) 2022 premex-byggappen

Copyright (c) 2023 developers at @usefulness

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand All @@ -18,4 +20,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
73 changes: 32 additions & 41 deletions README.md
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.
1 change: 0 additions & 1 deletion app/.gitignore

This file was deleted.

93 changes: 0 additions & 93 deletions app/build.gradle.kts

This file was deleted.

21 changes: 0 additions & 21 deletions app/proguard-rules.pro

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions app/src/main/AndroidManifest.xml

This file was deleted.

78 changes: 0 additions & 78 deletions app/src/main/java/se/premex/gross/MainActivity.kt

This file was deleted.

Loading

0 comments on commit d814476

Please sign in to comment.