Philip Dukhov
10/22/2021, 3:14 PMinclude(":module-name")
project(":module-name").projectDir = File("../../project-dir/")
But I'm getting an error about unrecognized class from buildSrc
folder of OtherProject
, from other project gradle.build
file. Itself OtherProject
builds fine. Do I need to add buildSrc
explicitly somehow?
Edit. I've tried includeBuild
as @Vampire suggested, but it doesn't seems working with my KMM module. I'm using this code:
includeBuild("../../project-dir/") {
dependencySubstitution {
substitute(module("com.project:module-name"))
.with(project(":module-name"))
}
}
Which produces the following error
ArtifactNotFoundException: Could not find kotlinx-coroutines-core-1.5.1-native-mt-samplessources.jar
Vampire
10/22/2021, 3:17 PMincludeBuild
, not include
and it will automatically substitute the binary dependency on the artifact from that build by a "sub-build".
https://docs.gradle.org/current/userguide/userguide_single.html#composite_buildsPhilip Dukhov
10/22/2021, 6:00 PMJeff Lockhart
10/22/2021, 8:29 PMVampire
10/23/2021, 3:06 AMLuc Girardin
12/05/2021, 5:00 PM