-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report is empty (Android) #174
Comments
See #113 (comment) |
@asarkar that does not solve this issue. |
Should not be an empty report |
@CEZIUM Your project doesn't apply the license plugin or my suggestion. |
The problem appears on my project the same as @CEZIUM and @st-f 's project. Unfortunately, however, the issue is still unresolved. Can you help me? my build scripts are here: [HELP] BUILD SCRIPTS OF MY GRADLE PROJECT - GitHub Gist |
Has anybody figured this out? I'm also getting empty report; just the header. |
We use a multi module build with Gradle:
When executing the :downloadLicences I get only an empty report. Tried to apply EDIT: It seems the plugin must now be manually applied to all submodules? Is this the correct behavior? If I apply it to a sub module then it will generate the reports. But I remember that once it worked even when applied to the root module. |
I am still seeing this same behavior. Has anybody got this to work? here is my gradle file: buildscript {
} plugins { allprojects { downloadLicenses { task clean(type: Delete) { |
Using This can help debugging: class TestLicenseTask extends DefaultTask {
@TaskAction
def greet() {
project.configurations.findAll {
isResolvable(it)
}.each { cfg ->
if (project.configurations.any { it.name == cfg.name && isResolvable(it) }) {
def configuration = project.configurations.getByName(cfg.name)
println "${cfg.name}:"
configuration.resolvedConfiguration.resolvedArtifacts.each { ResolvedArtifact d ->
String dependencyDesc = "$d.moduleVersion.id.group:$d.moduleVersion.id.name:$d.moduleVersion.id.version".toString()
println " - $dependencyDesc"
}
}
}
}
static boolean isResolvable(Configuration conf) {
return conf.metaClass.respondsTo(conf, "isCanBeResolved") ? conf.isCanBeResolved() : true
}
}
// Create a task using the task type
task testLicense(type: TestLicenseTask) |
I came across a fantastic solution here that perfectly addresses the issue. To summarize, the necessary modification was to replace Here's the updated code snippet: downloadLicenses {
includeProjectDependencies = true
dependencyConfiguration = "debugRuntimeClasspath"
// or
// dependencyConfiguration = 'compileClasspath'
} |
I can't see an empty message, just empty table headers. I'm using :
in build.gradle and
./gradlew downloadLicenses
to run it.Related: #104, #113
The text was updated successfully, but these errors were encountered: