jk1 / Gradle-License-Report

A plugin for generating reports about the licenses of third party software using Gradle
Other
330 stars 99 forks source link

Text renderer does not include custom provided dependencies #247

Open jonnyzzz opened 2 years ago

jonnyzzz commented 2 years ago

I have the config like:

licenseReport {
  outputDir = licenseReportOutputDir.absolutePath

  renderers = arrayOf(
    com.github.jk1.license.render.InventoryHtmlReportRenderer(
      licenseHtmlReportFile.relativeTo(licenseReportOutputDir).path,
      "Toolbox Enterprise Server"
    ),

    com.github.jk1.license.render.TextReportRenderer(
      licenseTxtReportFile.relativeTo(licenseReportOutputDir).path,
    )
  )

  importers = arrayOf(object: com.github.jk1.license.importer.DependencyDataImporter{
    override fun getImporterName() = "tbe-custom"

    override fun doImport() = mutableListOf(ImportedModuleBundle("Java Buildpack Memory Calculator", mutableListOf(ImportedModuleData(
      "Java Buildpack Memory Calculator",
      "4.2.0",
      "https://github.com/cloudfoundry/java-buildpack-memory-calculator/tree/v4.2.0",
      "Apache 2.0 license",
      "https://raw.githubusercontent.com/cloudfoundry/java-buildpack-memory-calculator/v4.2.0/NOTICE",
    ))))
  })
}

The manually declared library is only reported in the HTML report, but not in the Text report.

jk1 commented 2 years ago

Hi @jonnyzzz. Thanks for reaching out. May I ask what plugin version do you use?

jonnyzzz commented 2 years ago

I guess the latest one. I’ve set this up several months ago only.

On Wed 27. Jul 2022 at 11:55, Evgeny Naumenko @.***> wrote:

Hi @jonnyzzz https://github.com/jonnyzzz. Thanks for reaching out. May I ask what plugin version do you use?

— Reply to this email directly, view it on GitHub https://github.com/jk1/Gradle-License-Report/issues/247#issuecomment-1196517453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB6TLYXEPXHZTMP35Z5CBTVWEBQPANCNFSM54XD3B3A . You are receiving this because you were mentioned.Message ID: @.***>

-- Best regards, Eugene Petrenko https://jonnyzzz.com

jk1 commented 2 years ago

Sorry, but I need the number. The issue does not seem to be reproducible on my end, hence the question.

jonnyzzz commented 2 years ago

Sorry, I have that version:

id("io.spring.dependency-management") version "1.0.11.RELEASE"

On Wed, Jul 27, 2022 at 12:31 PM Evgeny Naumenko @.***> wrote:

Sorry, but I need the number. The issue does not seem to be reproducible on my end, hence the question.

— Reply to this email directly, view it on GitHub https://github.com/jk1/Gradle-License-Report/issues/247#issuecomment-1196553201, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB6TL6RBTYXFDZN7YADCF3VWEFWPANCNFSM54XD3B3A . You are receiving this because you were mentioned.Message ID: @.***>

jk1 commented 2 years ago

This must be a different plugin I'm afraid. The id we're looking for is com.github.jk1.dependency-license-report

jonnyzzz commented 2 years ago

I have that:

id("com.github.jk1.dependency-license-report") version "2.0" apply false

On Wed, Jul 27, 2022 at 7:02 PM Evgeny Naumenko @.***> wrote:

This must be a different plugin I'm afraid. The id we're looking for is com.github.jk1.dependency-license-report

— Reply to this email directly, view it on GitHub https://github.com/jk1/Gradle-License-Report/issues/247#issuecomment-1197049664, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB6TL5ANOVUV7QSC7L5WQDVWFTTFANCNFSM54XD3B3A . You are receiving this because you were mentioned.Message ID: @.***>