question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem when migrating to Gradle 7.0

See original GitHub issue

I 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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bjoernQcommented, Apr 29, 2021

Thanks @ggrell for letting me know it’s working. Will close this issue

0reactions
ggrellcommented, Apr 28, 2021

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. 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found