All Projects → cookpad → Licensetoolsplugin

cookpad / Licensetoolsplugin

Licence: apache-2.0
Gradle plugin to check library licenses and generate license pages for Android

Projects that are alternatives of or similar to Licensetoolsplugin

Gradle License Report
A plugin for generating reports about the licenses of third party software using Gradle
Stars: ✭ 152 (+34.51%)
Mutual labels:  gradle-plugin, license-management
Obfusesmalitext
smali文件,jar包字符串混淆,支持gradle插件
Stars: ✭ 105 (-7.08%)
Mutual labels:  gradle-plugin
Methodtraceman
用于快速找到高耗时方法,定位解决Android App卡顿问题。通过gradle plugin+ASM实现可配置范围的方法插桩来统计所有方法的耗时,并提供友好的界面展示,支持耗时筛选、线程筛选、方法名筛选等。(A Tool for Discovering High Time-consuming Methods for Android App)
Stars: ✭ 1,258 (+1013.27%)
Mutual labels:  gradle-plugin
Vertx Gradle Plugin
An opinionated Gradle plugin for Vert.x projects
Stars: ✭ 98 (-13.27%)
Mutual labels:  gradle-plugin
Injector
Gradle plugin for android which makes easier to inject aar libraries into project
Stars: ✭ 87 (-23.01%)
Mutual labels:  gradle-plugin
Android String Reference
This is a Gradle plugin for Android applications which resolves XML string references in other XML strings.
Stars: ✭ 102 (-9.73%)
Mutual labels:  gradle-plugin
Rambuild
A plugin to make builds in gradle run on ram instead of the hard drive
Stars: ✭ 84 (-25.66%)
Mutual labels:  gradle-plugin
Kotlin
The Kotlin Programming Language.
Stars: ✭ 39,664 (+35000.88%)
Mutual labels:  gradle-plugin
Jenkins Pipeline Shared Libraries Gradle Plugin
Gradle plugin to help with build and test of Jenkins Pipeline Shared Libraries (see https://jenkins.io/doc/book/pipeline/shared-libraries/)
Stars: ✭ 103 (-8.85%)
Mutual labels:  gradle-plugin
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-14.16%)
Mutual labels:  gradle-plugin
Wwhrd
You have licenses to manage, What Would Henry Rollins Do?
Stars: ✭ 97 (-14.16%)
Mutual labels:  license-management
No Copy
A Kotlin compiler plugin that removes the `copy` method of data classes.
Stars: ✭ 90 (-20.35%)
Mutual labels:  gradle-plugin
Gradle Changelog Plugin
Plugin for parsing and managing the Changelog in a "keep a changelog" style.
Stars: ✭ 102 (-9.73%)
Mutual labels:  gradle-plugin
Gradle Buildconfig Plugin
A plugin for generating BuildConstants for any kind of Gradle projects: Java, Kotlin, Groovy, etc. Designed for KTS scripts.
Stars: ✭ 85 (-24.78%)
Mutual labels:  gradle-plugin
Library Analysis
Library Analysis Gradle Plugin
Stars: ✭ 105 (-7.08%)
Mutual labels:  gradle-plugin
Androidanimationexercise
Android 动画各种实现,包括帧动画、补间动画和属性动画的总结分享
Stars: ✭ 1,254 (+1009.73%)
Mutual labels:  gradle-plugin
Truelicense
TrueLicense is an open source engine for license management on the JVM.
Stars: ✭ 94 (-16.81%)
Mutual labels:  license-management
Kordamp Gradle Plugins
A collection of Gradle plugins
Stars: ✭ 100 (-11.5%)
Mutual labels:  gradle-plugin
Gradle Build Properties Plugin
Keep your secrets secret. External build properties support for your Gradle scripts.
Stars: ✭ 110 (-2.65%)
Mutual labels:  gradle-plugin
Ercole
The Server component of the Ercole Project
Stars: ✭ 107 (-5.31%)
Mutual labels:  license-management

License Tools Plugin for Android

Actions Status License Gradle Plugin Portal

This repository is a replacement project of cookpad/license-tools-plugin written with kotlin

License List(sample)

Setup

Recommend

plugins {
  id "com.cookpad.android.plugin.license-tools" version "${latest_version}"
}

If you use legacy gradle project

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.cookpad.android.plugin:plugin:${latest_version}"
  }
}

apply plugin: "com.cookpad.android.plugin.license-tools"

Learn how to apply plugins to subprojects

Gradle tasks

This Plugin provite to check library licenses and generate license pages.

  • ./gradlew checkLicenses to check licenses in dependencies
  • ./gradlew updateLicenses to update library information file licenses.yml
  • ./gradlew generateLicensePage to generate a license page licenses.html
  • ./gradlew generateLicenseJson to generate a license json file licenses.json

How To Use

Run the checkLicenses task

You will see the following messages by ./gradlew checkLicenses:

# Libraries not listed:
- artifact: androidx.annotation:annotation:+
  name: Android Support Library Annotations
  copyrightHolder: #COPYRIGHT HOLDER#
  license: The Apache Software License, Version 2.0
  url: http://developer.android.com/tools/extras/support-library.html
  licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
- artifact: io.reactivex.rxjava2:rxjava:+
  name: rxjava
  copyrightHolder: #COPYRIGHT HOLDER#
  license: The Apache Software License, Version 2.0
  url: https://github.com/ReactiveX/RxJava2

Add library licenses to app/licenses.yml

Then, Create app/licenses.yml, and add libraries listed the above with required fields:

- artifact: androidx.annotation:annotation:+
  name: Android Support Library Annotations
  copyrightHolder: Google Inc.
  license: The Apache Software License, Version 2.0
  url: http://developer.android.com/tools/extras/support-library.html
  licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
- artifact: io.reactivex.rxjava2:rxjava:+
  name: rxjava
  copyrightHolder: Netflix, Inc.
  license: The Apache Software License, Version 2.0
  url: https://github.com/ReactiveX/RxJava2

You can use wildcards in artifact names and versions. You'll know the Android support libraries are grouped in androidx.annotation:annotation so you use androidx.annotation:annotation:+:+ here.

Then, ./gradlew checkLicenses will passes.

Generate licenses.html by the generateLicensePage task

./gradlew generateLicensePage generates app/src/main/assets/licenses.html.

This plugin does not provide Activity nor Fragment to show licenses.html. You should add it by yourself.

example/MainActivity is an example.

Configuring the plugin

Use licenseTools in your build.gradle to add some optional configuration.

For example:

licenseTools {
    outputHtml = "licenses_output.html"
}

Available configuration fields:

Field name Default value Description
licensesYaml "licenses.yml" The name of the licenses yml file
outputHtml "licenses.html" The file name of the output of the generateLicensePage task
outputJson "licenses.json" The file name of the output of the generateLicenseJson task
ignoredGroups [] (empty array) An array of group names the plugin will ignore (useful for internal dependencies with missing .pom files)
ignoredProjects [] (empty array) An array of project names the plugin will ignore (To ignore particular internal projects like custom lint)

DataSet Format

Required Fields

  • artifact
  • name
  • Either copyrightHolder, author, authors or notice

Optional Fields

  • year to indicate copyright years
  • skip to skip generating license entries (for proprietary libraries)
  • forceGenerate to force generate the output with arbitrary items. (Read [this issue](Feature Request: feature for adding/changing licenses by hand #78) for more details.)
    • If some pom data is wrong, you can override some of them using this flag.

Sample

- artifact: androidx.annotation:annotation:+
  name: Android Support Library Annotations
  copyrightHolder: Google Inc.
  license: The Apache Software License, Version 2.0
  url: http://developer.android.com/tools/extras/support-library.html
  licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
- artifact: androidx.appcompat:appcompat:+
  name: Android AppCompat Library v7
  copyrightHolder: Google Inc.
  license: The Apache Software License, Version 2.0
  url: http://developer.android.com/tools/extras/support-library.html
  licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
- artifact: com.github.bumptech.glide:glide:+
  name: Glide
  copyrightHolder: Sam Judd
  license: Simplified BSD License
  url: https://github.com/bumptech/glide
  licenseUrl: http://www.opensource.org/licenses/bsd-license

Release Engineering

  1. Update CHANGELOG.md & Commit
  2. git tag $next_version (i.g. git tag 1.2.0)
  3. git push orgin master --tags
  4. Fire publish action (automatically)

After that check https://plugins.gradle.org/plugin/com.cookpad.android.plugin.license-tools

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].