Problem when migrating to Gradle 7.0
See original GitHub issueI am seeing this after migrating from gradle 6.8.2 to gradle 7.0:
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':app:unMock' (type 'UnMockTask').
- Type 'UnMockTask' property 'outputDir' is annotated with @PathSensitive but that is not allowed for 'OutputDirectory' properties.
Reason: This modifier is used in conjunction with a property of type 'OutputDirectory' but this doesn't have semantics.
Possible solution: Remove the '@PathSensitive' annotation.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#incompatible_annotations for more details about this problem.
- Type 'UnMockTask' property 'unmockedOutputJar' is annotated with @PathSensitive but that is not allowed for 'OutputFile' properties.
Reason: This modifier is used in conjunction with a property of type 'OutputFile' but this doesn't have semantics.
Possible solution: Remove the '@PathSensitive' annotation.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#incompatible_annotations for more details about this problem.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 10s
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Upgrading your build from Gradle 7.x to the latest
This chapter provides the information you need to migrate your Gradle 7.x builds to the latest Gradle release. For migrating from Gradle 4.x,...
Read more >Gradle 6.8 to 7 migration dependency configuration issue
I am trying to upgrade from 6.8 to 7. The project started on gradle 4.x and the dependencies are configured as compile and...
Read more >Known issues with Android Studio and Android Gradle Plugin
Gradle issue 18149 affects Android Gradle Plugin versions 7.0 and higher because they require Gradle version 7.0 and higher. Starting in Gradle 7.0,...
Read more >Gradle Plugin - Flyway by Redgate • Database Migrations ...
When using Java migrations and callbacks with the gradle Flyway plugin, you need to ensure that the classes have been compiled before running...
Read more >How to Update Gradle, Migrate to AndroidX (News Media #6)
To be honest, this is a somewhat boring video. But it's important because upgrading Gradle and migrating to AndroidX can fix a lot...
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 Free
Top 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
Thanks @ggrell for letting me know it’s working. Will close this issue
I just had to upgrade to Gradle 7.0 due to a Kotlin versioning issue and was getting the same (or similar) error as @ligi. Upgrading to
0.7.8
fixed it for me. 👍