Steven Devijver wrote:
Hey,

I have this configuration:

dependencies {
moduleJars project('java14')
moduleJars project('java15')
}
task moduleJar(type: Jar) {
destinationDir = file('build/jar_for_module')
baseName = project.name
dependsOn configurations.moduleJars.buildDependencies
}

The java15 project depends on the java14 project. However, when I run the moduleJar task the dependency of the java15 project on the java14 project seems to be somehow forgotten:

C:\dev1\spring-framework-2.5.6.SEC01>gradle -s clean build upload | more
:modules:spring-beans:java14:clean
:modules:spring-beans:java15:clean
:modules:spring-core:java14:clean
:modules:spring-core:java15:clean
:modules:spring-core:java14:compileJava
:modules:spring-core:java14:processResources
:modules:spring-core:java14:classes
:modules:spring-core:java14:jar
:modules:spring-core:java15:compileJava
C:\dev1\spring-framework-2.5.6.SEC01\tiger\src\org\springframework\core\annotati
on\AnnotationAwareOrderComparator.java:19: cannot find symbol
symbol  : class OrderComparator
location: package org.springframework.core
import org.springframework.core.OrderComparator;
                               ^

Is this as expected?

It depends on how you've declared the dependency of the java15 project on the java14 project. How have you done this?

I found I had to let the moduleJar task depend on the build dependencies of the specific configuration, otherwise the jar file would be empty and the java14 and java15 project would no be built.


The auto task dependency stuff is this very much a work in progress - it works for some things and not for others. It really just does the minimum that the java plugin needs at this stage. Hopefully we'll have time to include the general solution in the 0.9 release.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org

Reply via email to