https://github.com/chao2zhang/xuke
A Gradle plugin to collect software licenses from dependencies
https://github.com/chao2zhang/xuke
license license-management licenses
Last synced: 7 months ago
JSON representation
A Gradle plugin to collect software licenses from dependencies
- Host: GitHub
- URL: https://github.com/chao2zhang/xuke
- Owner: chao2zhang
- License: mit
- Created: 2022-02-20T05:57:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T15:52:48.000Z (over 2 years ago)
- Last Synced: 2025-03-20T08:51:26.307Z (7 months ago)
- Topics: license, license-management, licenses
- Language: Kotlin
- Homepage:
- Size: 128 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Xuke
[](https://github.com/cortinico/kotlin-gradle-plugin-template/actions?query=workflow%3A%22Pre+Merge+Checks%22)
[](LICENSE)
## Goal
Displaying used open source libraries and their licenses not only shows appreciations for the effort of library authors, but they could be also license requirements of those libraries. Apps are responsible for appropriately displaying the notices for the open source libraries, and this Gradle plugin automates this process by collecting the licenses from libraries and generates the source code for apps to display.## Background
Xuke comes from 许可 (License in Chinese)## Tutorial
Add the following scripts to your Gradle scripts:```kotlin
plugins {
id("io.github.chao2zhang.xuke")
}configure {
// The Gradle build configurations from which we collect dependencies
configurations.set(listOf("runtimeClasspath"))// The output file of the licenses collected - Only supporting .kt file as of now
outputFile.set(project.layout.buildDirectory.file("generated/license/SoftwareLicense.kt"))
// The output package name of the output file
outputPackage.set("io.github.chao2zhang.example")
}
```Now you can run Gradle task `xuke` to generate the sources.