Greetings,

I have a Gradle rookie question which I was not able to solve after
searching the internet for a considerable amount of time, maybe you can
help.
I recently decided to upgrade all of my Java projects in netbeans from Ant
to Gradle build and after a bit of a learning curve it works, except for
one thing: recompiling project dependencies when I change source code there.

Example:

- Project A is required for Project B
- Project B has this in settings.gradle:

includeBuild '../A'

  pointing to the root directory of project A
- Project B has a dependency in its build.gradle:

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile(
              fileTree(dir: "../A/build/libs", include: '*.jar'),
              fileTree(dir: "../A/src", include: '*.java')
    )
}

My expectation is that if I want to run B and prior to that make a change
in A, the IDE notices and recompiles as necessary project A first. This
works out-of-the-box for Ant when I add A as a project dependency for B,
but for my current Gradle setup, I need to manually
recompile A first. One would think that this can't be the final answer
here, so I must be doing something wrong.

Any hints greatly appreciated.
Thx Matthias

Reply via email to