2

so I have an Android project with a module App that depends on a module A that depends on a module B (App -> A -> B), in such a way that the gradle file of the module A looks like this:

...
implementation project(':feature_B')
...

Then in the B module I have the following class:

public class Whatever() {
  private void doSomething() {
    int value = 5;
  }
}

So the problem is that whenever I change the doSomething() method, for example by setting value with 6 instead of 5, and then I rebuild the project, I get this log:

...

> Task :feature_B:kaptDebugKotlin
> Task :feature_BcompileDebugKotlin
> Task :feature_B:javaPreCompileDebug UP-TO-DATE
> Task :feature_B:compileDebugJavaWithJavac
...
> Task :feature_A:kaptDebugKotlin
> Task :feature_A:compileDebugKotlin
> Task :feature_A:javaPreCompileDebug
> Task :feature_A:compileDebugJavaWithJavac UP-TO-DATE
...

When according to this Google IO '17 talk (https://www.youtube.com/watch?v=7ll-rkLCtyk&t=1566s) the module A shouldn't be rebuilt at all since the only thing that changed in B was the implementation of a private method... Therefore all the tasks for A should be "UP-TO-DATE"...

Am I missing something on my module A gradle file? did the guy from Google made it up?

Many thanks!

Hannibalem
  • 483
  • 5
  • 7
  • I am not an Android@Gradle specialist but `compileDebugJavaWithJavac` is UP-TO-DATE so since you made an ABI compatible change (private method change), it seems normal. Regarding the others task, i can't tell. Maybe you can share more logs ? – ToYonos Mar 20 '19 at 17:21

0 Answers0