Skip to content
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

Incremental Java compilation is broken with Android 3.5.1 and Gradle 6.0 #11330

Closed
wolfs opened this issue Nov 12, 2019 · 3 comments
Closed

Incremental Java compilation is broken with Android 3.5.1 and Gradle 6.0 #11330

wolfs opened this issue Nov 12, 2019 · 3 comments
Assignees
Milestone

Comments

@wolfs
Copy link
Member

wolfs commented Nov 12, 2019

See https://issuetracker.google.com/issues/144011039

Changes to sources added by the Android Gradle plugin to AndroidJavaCompile.getSources() are ignored for incremental Java compilation in Gradle 6.0. When changing a source file, the output is something like this:

> Task :mylibrary1:compileReleaseJavaWithJavac UP-TO-DATE
Task :mylibrary1:compileReleaseJavaWithJavac in app Starting
Build cache key for task ':mylibrary1:compileReleaseJavaWithJavac' is 669111c814f7b237087e6a217a4ff93a
Task ':mylibrary1:compileReleaseJavaWithJavac' is not up-to-date because:
  Input property 'sources' file /home/user/test/mylibrary1/src/main/java/com/test/mylibrary1/LibClass.java has changed.

Note that there isn't a mention of the input property stableSources, which is actually tracked for changes. Not the property source of the SourceTask is mentioned.

@wolfs wolfs added this to the 6.0.1 milestone Nov 12, 2019
@wolfs wolfs self-assigned this Nov 12, 2019
@wolfs
Copy link
Member Author

wolfs commented Nov 12, 2019

cc @gradle/build-cache

wolfs added a commit that referenced this issue Nov 12, 2019
wolfs added a commit that referenced this issue Nov 13, 2019
So it doesn't try to run on pre 5.x versions. PathSensitivity has been
introduced in 3.1, though it doesn't make much sense to run the test
pre 5.0.

#11330
@wolfs
Copy link
Member Author

wolfs commented Nov 13, 2019

See #11359 for the smoke tests.

@wolfs
Copy link
Member Author

wolfs commented Nov 14, 2019

Fixed via #11331.

@wolfs wolfs closed this as completed Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants