Skip to content

A Gradle plugin to collect software licenses from dependencies

License

Notifications You must be signed in to change notification settings

chao2zhang/Xuke

Repository files navigation

Xuke

Pre Merge Checks License Language

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:

plugins {
    id("io.github.chao2zhang.xuke")
}

configure<XukeExtension> {

    // 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.

About

A Gradle plugin to collect software licenses from dependencies

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages