Cannot change attributes of dependency configuration ':my-module:releaseUnitTestCompileClasspath' after it has been resolved
See original GitHub issueHi, I am trying to import Paparazzi in a module, however, I’m not able to build after adding Paparazzi gradle plugin.
Cannot change attributes of dependency configuration ':my-module:releaseUnitTestCompileClasspath' after it has been resolved
A problem occurred configuring project ':my-module'.
> Failed to notify project evaluation listener.
> java.lang.IllegalArgumentException: Cannot change attributes of dependency configuration ':fmy-module:releaseUnitTestCompileClasspath' after it has been resolved
> KotlinJvmAndroidCompilation with name 'releaseUnitTest' not found.
Is this an issue with the plugin, or am I missing sth? Thanks!
Issue Analytics
- State:
- Created a year ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Cannot change attributes of dependency configuration ':app ...
I had the same issue. It was this code: project.tasks.withType(Test::class.java) { useJUnitPlatform() testLogging { setEvents(setOf("passed" ...
Read more >Cannot change attributes of configuration ':android:kapt' after it ...
Issue details sync failed with Cannot change attributes of configuration ':android:kapt' after it has been resolved message.
Read more >Weird error when trying to add dependency "Cannot change ...
When I try to compile my project with a dependency, it refused to compile with ... "Cannot change configuration after it has been...
Read more >Cannot change dependencies of configuration *** after it has ...
Android compile error: Cannot change dependencies of configuration *** after it has been included in dependency resolution.
Read more >4. Dependency Management - Gradle Beyond the Basics [Book]
Different kinds of dependencies are resolved into files in different ways. While this is the fundamental role of configurations, they also provide methods ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The US Supreme Court is set to overturn Roe v. Wade according to a leaked ruling draft despite an overwhelming support for it by the public.
The son of the dictator who ruled the Philippines for 14 years under martial law is set to become the next president.
Pfizer and Moderna are developing Omicron-specific vaccines as cases continue to rise globally.
Posting advice in case anyone else comes across this:
This is not a Paparazzi issue, but adding the Paparazzi plugin can surface an existing issue with your build script.
A few years ago the Gradle Tasks API changed in a way that meant many projects could update to newer versions of Gradle and not see any issue… it was a very forgiving API change, in that many users would see no difference and things continued to work as expected, despite their project now using an outdated and no-longer-recommended API.
If you’re working on an older codebase, or a codebase that copied its
tasks.withType(Test)
code from an older project and never updated to the new Tasks API, adding Paparazzi will surface this problem.TL;DR: Update your Test configuration tasks to use
configureEach
.Before:
After:
cc: @sherviiin @robertpicsart @eboudrant @MarinaShaposhnikova