Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 20373

Java-library - enforce jar file to be build if added to another projects custom configuration

$
0
0

Hello,

I try depend on a java-library “anotherProject” within a multi project build like :

project.dependencies.add("myconfiguration", project.findProject("anotherProject"))

I need to extract the files of myconfiguration:

project.configurations.getByName("myconfiguration").asFileTree.forEach {...}

BUT: This may causes a file not found exception of the .jar of “anotherProject” because the jar task of anotherProject is never executed - but the configuration contains already the jar file name. Is there a standard way to ensure the .jar artifact is build without introducing direct project task dependency?


Viewing all articles
Browse latest Browse all 20373

Trending Articles