Giter VIP home page Giter VIP logo

license-gather-plugin's Introduction

Build Status

License Gather Plugin

The purpose of the plugin is to analyze and infer license names for the dependencies. The plugin checks for 3 places: MANIFEST.MF (Bundle-License attribute), pom.xml (licenses/license tags), and finally LICENSE-like files. Note: for now only fuzzy-match is implemented, and by default a similarity threshold of 42% is used.

License Gather Plugin uses https://github.com/spdx/license-list-data for the list of licenses.

Prior art

https://github.com/jk1/Gradle-License-Report

Gradle-License-Report is nice (it is), however there are certain pecularities (as of 2019-06-04)

  • It can't generate multiple lists within a single project (e.g. license for source / binary artifacts)
  • The model for imported/discovered licenses is differnet
  • There's no way to override license detection
  • SPDX is not used

Features

  • LICENSE file generation (TODO)

  • License whitelisting (TODO)

  • The detected licenses can be overriden

  • Support for incremental-builds (discovery does not run in case dependencies do not change)

  • Type-safe license enumeration (based on SPDX):

    com.github.vlsi.gradle.license.api.License#Apache_2_0

Usage

Gradle (Groovy DSL):

id('com.github.vlsi.license-gather') version "1.0.0"

tasks.register("generateLicense", GatherLicenseTask.class) {
    configurations.add(project.configurations.runtime)
    outputFile.set(file("$buildDir/result.txt"))

    doLast {
        println(outputFile.get().asFile.text)
    }
}

Gradle (Kotlin DSL):

id('com.github.vlsi.license-gather') version "1.0.0"

tasks.register("generateLicense", GatherLicenseTask::class) {
    configurations.add(project.configurations.runtime)
    outputFile.set(file("$buildDir/result.txt"))

    doLast {
        println(outputFile.get().asFile.readText())
    }
}

License

This library is distributed under terms of Apache License 2.0

Change log

v1.0.0

  • Initial release: basic license gathering

Author

Vladimir Sitnikov [email protected]

license-gather-plugin's People

Contributors

vlsi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.