Android module with DH-3 enabled recompile `AndroidJavaCompile` when no changes occurred.
Opened this issue · 4 comments
Hi, we are having a strange behaviour on the module that enable DH 3 recently.
We are using multi module, let say I have module structure like this:
Core --> Feature --> Appentry
Assume making a changes on module Core, and run the first build (which will recompile Feature and Appentry module).
But when we run a second build after this without any changes, the feature module recompile on this task com.android.build.gradle.tasks.AndroidJavaCompile
. This should not be happen because the task still must be up to date because I making no changes on the code.
Checking from build-scan:
The task was not up-to-date because of the following reasons:
--
Input property 'source' file feature/build/generated/source/navigator/generalDebug has been removed.
Input property 'source' file feature/build/generated/source/navigator/generalDebug/com/myapp/android/feature/HensonNavigator.java has been removed.
Input property 'source' file feature/build/generated/source/navigator/generalDebug/com/myapp/android has been removed.
I believe that before running the second build, the file is still on that folder. But don't know why the task need to be recompile with that reasons. And if I run 3rd build, all of the task will be up-to-date. So it seems to be happen only after upper stream module being recompile.
Here are the details of our project:
AGP: 3.3.2
Gradle version: 5.2.1
DH version: 3.1.2
Databinding: Enabled
Proguard: Disabled
Kotlin: Enabled
Do you know something about it ? please let me know if you need additional information.
Any help would be appreciated. Thanks
Hi any update on this issue ?
hi @f2prateek do you know something about it ? it also happen on sync and slowing our build.
Hi @stephanenicolas , I am able to repro this on sample project. I just updated the AGP version, and gradle version. Please find my attachment for the sample project.dart-sample 2.zip
Here are the build scan from first build:
https://scans.gradle.com/s/g77dlqxawwyjk/timeline?task=pwl6utdfccz42
This is clean build, so make sense why all task being compiled.
But running second build without changing anything, some task will need to rerun:
https://scans.gradle.com/s/kdyhu7v63xle2/timeline?task=pwl6utdfccz42
with this reason:
The task was not up-to-date because of the following reasons:
Input property 'source' file module1/build/generated/source/navigator/debug has been removed.
Input property 'source' file module1/build/generated/source/navigator/debug/com has been removed.
Input property 'source' file module1/build/generated/source/navigator/debug/com/f2prateek has been removed.
Let me know if you need additional information, Thanks.