Gradle-License-Report icon indicating copy to clipboard operation
Gradle-License-Report copied to clipboard

allowed-licenses.json doesn't affect the report

Open RoRoche opened this issue 5 years ago • 1 comments

Here is my config/allowed-licenses.json:

{
  "allowedLicenses": [
    {
      "moduleLicense": "Apache License, Version 2.0",
      "moduleName": ".*"
    },
    {
      "moduleLicense": "Apache 2.0",
      "moduleName": ".*"
    }
  ]
}

The build.gradle defines it:

licenseReport {
    allowedLicensesFile = new File("$projectDir/config/allowed-licenses.json")
}

But the report still notices that "Some library licenses are not allowed":

{
    "dependenciesWithoutAllowedLicenses": [
        {
            "moduleLicense": "Apache License, Version 2.0",
            "moduleVersion": "2.3.1",
            "moduleName": "net.jodah:failsafe"
        },
        {
            "moduleLicense": "Apache License, Version 2.0",
            "moduleVersion": "4.5.12",
            "moduleName": "org.apache.httpcomponents:httpclient"
        }
    ]
}

RoRoche avatar Apr 06 '20 14:04 RoRoche

I also meet this problem, is there some docs about how to config allowed-licenses.json ?

ruanwenjun avatar Jul 23 '21 05:07 ruanwenjun