janvladimirmostert
01/16/2021, 12:00 PMinclude("project-a:module-4")
project(":project-a:module-4").projectDir =
File("../project-a/module-4")
ProjectB Module4's build.gradle.kts
sourceSets {
val jvmMain by getting {
dependencies {
...
implementation(project(":project-a:module-4"))
}
}
}
this compiles, but nothing resolvesVampire
01/16/2021, 12:43 PMinclude
. include
is for building a mutli-project build consisting of mutliple projects that belong together. To have a "sub-build" of a "foreign" dependency, use composite builds (includeBuild
) https://docs.gradle.org/current/userguide/composite_builds.htmljanvladimirmostert
01/16/2021, 1:11 PMinclude
to includeBuild
in settings.gradle.kts
,
Project with path :project-a:module-4 could not be found in project :project-b:module-4
does includeBuild
make a difference somehow?
i will be working on both projectA and projectB at the same time, so if projectA changes, projectB needs to rebuildVampire
01/16/2021, 2:02 PMjanvladimirmostert
01/16/2021, 3:25 PMVampire
01/16/2021, 4:17 PMincludeBuild
with the relative path to the other build (whole build, not subproject) and declare a dependency like if the project you want to depend on were in some maven repository.janvladimirmostert
01/16/2021, 4:27 PMproject-b->settings.gradle.kts
includeBuild("../project-a")
and then inside project-b's module-4
val jvmMain by getting {
dependencies {
implementation("project-a:module-4")
which bombs out with
Could not find project-a:module-4:.
Required by:
project :project-b:module-4
would be amazing if this works, can finally work concurrently on a lot of things 😄val jvmMain by getting {
dependencies {
implementation("io.blah:projecta-module-4")
and it works
thanks for the help, much appreciated!!Vampire
01/16/2021, 6:35 PM