Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.53 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.53 KB

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.