diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b8673a..05b22be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,6 +53,11 @@ jobs: uses: gradle/gradle-build-action@v2 with: arguments: jpackageImageZip + - if: ${{ matrix.os == 'macos-latest' }} + name: Generate dependency report + uses: gradle/gradle-build-action@v2 + with: + arguments: downloadLicenses - if: ${{ matrix.os == 'macos-latest' }} name: Upload Mac pkg uses: actions/upload-artifact@v2 @@ -69,6 +74,14 @@ jobs: path: ./build/jpackage/*.msi if-no-files-found: error retention-days: 3 + - if: ${{ matrix.os == 'macos-latest' }} + name: Upload Mac pkg + uses: actions/upload-artifact@v2 + with: + name: dependency-report + path: ./build/reports/license/dependency-license* + if-no-files-found: error + retention-days: 3 upload: name: Create release needs: build @@ -85,5 +98,6 @@ jobs: files: | windows-package/*.msi macos-package/*.zip + dependency-report/* draft: true fail_on_unmatched_files: true diff --git a/build.gradle b/build.gradle index e793edb..23ad925 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ plugins { id 'application' id 'org.openjfx.javafxplugin' version '0.0.10' id 'org.beryx.runtime' version '1.12.5' + id "com.github.hierynomus.license-report" version "0.16.1" } version = '2.0.0' @@ -146,3 +147,26 @@ runtime { from layout.buildDirectory.dir("jpackage") } } + +downloadLicenses { + includeProjectDependencies = true + dependencyConfiguration = 'runtimeClasspath' + licenses = [ + // See https://github.com/Unidata/netcdf-java/blob/v5.3.3/LICENSE + (group('edu.ucar')): license('The 3-Clause BSD License', 'https://opensource.org/license/bsd-3-clause/'), + // See https://github.com/openjdk/jfx/blob/17%2B2/LICENSE + (group('org.openjfx')): license('GNU General Public License version 2 with Classpath Exception', 'https://openjdk.org/legal/gplv2+ce.html'), + // See https://github.com/javaee/jaxb-v2/blob/2.3.0/LICENSE + (group('javax.xml.bind')): license('Common Development and Distribution License 1.1 and GNU General Public License version 2 with Classpath Exception', 'https://oss.oracle.com/licenses/CDDL+GPL-1.1'), + // See https://github.com/openpnp/opencv/blob/v3.4.2-0/LICENSE + (group('org.openpnp')): license('The 3-Clause BSD License', 'https://opensource.org/license/bsd-3-clause/'), + ] + aliases = [ + (license('Apache License, Version 2.0', 'http://www.apache.org/licenses/LICENSE-2.0')) : ['The Apache Software License, Version 2.0', 'Apache 2', 'Apache License Version 2.0', 'Apache License 2.0', 'The Apache License, Version 2.0', 'Apache 2.0', 'Apache-2.0'], + (license('GNU Lesser General Public License version 2.1', 'https://opensource.org/license/lgpl-2-1/')) : ['GNU Lesser General Public License v2.1+'], + (license('GNU General Public License version 2', 'https://opensource.org/license/gpl-2/')) : ['GNU General Public License v2+'], + (license('The 2-Clause BSD License', 'https://opensource.org/license/bsd-2-clause/')) : ['Simplified BSD License', 'The BSD License', 'New BSD License'], + (license('The 3-Clause BSD License', 'https://opensource.org/license/bsd-3-clause/')) : ['The BSD 3-Clause License (BSD3)', '3-Clause BSD License'], + (license('The MIT License', 'https://opensource.org/license/mit/')) : ['MIT License', 'MIT'] + ] +}