With a JavaExec task: task runIt (type: JavaExec, dependsOn: "classes") { classpath configurations.runtime, configurations.provided main = "my.main.class" }
This is a multi-module build, this project has a dependency on project(":dependent-project"), which has a dependency of project(":base-project"). dependent-project and base-project also have some compile dependencies declared. The classpath for the javaexec task doesn't transitively resolve dependencies. Any idea's on how to get it to? I've tried adding a 2nd custom configuration that has project(path: ":dependent-project", configuration: "compile") as a dependency. That throws an exception: "configuration not public in [dependent]: compile". If i reference a custom configuration, I get "configuration not found in [dependent-project]", though if i get this to work, i am not sure how to get all the dependencies from base-project through the dependent project to the run project.