Comments (5)
I have had this plugin applied to a project of mine - https://github.com/jaredsburrows/android-gif-search. It has now been migrated to ksp instead of kapt
/ annotationProcessor
. I have not been able to reproduce this.
I can look into removing these warnings produced by the plugin scanning the configurations.
from gradle-license-plugin.
Actually I think setting configuration.isCanBeResolved = true
at https://github.com/jaredsburrows/gradle-license-plugin/blob/master/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/LicenseReportTask.kt#L161 is not necessary.
from gradle-license-plugin.
Is this the same as #234? Also, why is configuration.isCanBeResolved = true
not necessary?
from gradle-license-plugin.
Is this the same as #234?
Probably, yes.
My workaround for this issue is:
// Silence excessive warning messages from "license[Debug|Release]Report" task,
// see https://github.com/jaredsburrows/gradle-license-plugin/issues/338
forEachTask(predicate = { it.name == "license${variantName}Report" }) {
it.notCompatibleWithConfigurationCache("Not implemented")
(it.logger as ContextAwareTaskLogger).setMessageRewriter { logLevel, message ->
if (logLevel == LogLevel.WARN && message.startsWith(
"Cannot resolve configuration"
)
) null else message
}
}
I couldn't get rid of the error messages by using mustRunAfter
/dependsOn
as suggested in #234. The project where I see the issue is an Android project if that matters.
I also call notCompatibleWithConfigurationCache
on the license task as it's not yet (version 0.9.4
) compatible with the configuration cache.
from gradle-license-plugin.
For those interested, the meaning of those flags is discussed at https://docs.gradle.org/7.5.1/userguide/declaring_dependencies.html#sec:resolvable-consumable-configs.
Setting the isCanBeResolved turns producer and internal configurations to consumers. In the project I am working on doing so has unexpected side-effects on the Gradle build cache, so that it no longer matches!
Admittedly I do not fully understand the effect on the build cache, but I could resolve it by running the license plugin in a separate Gradle invocation separate from all other tasks. My guess is changing isCanBeResolved leads to a different order of dependencies in other configurations...
I am saying changing the flag should not be necessary because a configuration that is not resolvable contributes files to the build only if it is resolved indirectly via some other configuration extending upon it. But in that case the files in question are part of the extending configuration as well and so are picked up by the license plugin nevertheless.
from gradle-license-plugin.
Related Issues (20)
- Multi Module Android Project HOT 2
- Add support for Gradle's configuration cache HOT 3
- License report task crashes with a StackOverflowError HOT 1
- Dependency has an invalid license URL; skipping license HOT 2
- NoSuchMethodError during building Kotlin project after applying the plugin HOT 1
- Resolving artifacts may take exponential execution time HOT 4
- Need to enhance known licenses list HOT 2
- ignoredGroups matches artifact substrings HOT 1
- Licenses of a single project are not sorted correctly HOT 1
- Project group order on HTML report is unstable HOT 1
- Using multiple configurations causes incorrect dependency reporting
- Support for Gradle configuration cache HOT 1
- StackOverflowError when using Gradle module replacement rules
- Add support for dark mode
- Does this also works for flutter project HOT 1
- generated license HTML report has incorrect (?) anchor behaviour HOT 1
- Dependency Dashboard
- How can I contribute to this project?
- Empty report when licenseReport is a dependency of another task
- The report generates non deterministic results because of the sorting method used
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-license-plugin.