hello everyone. Is it possible use composite build...
# gradle
f
hello everyone. Is it possible use composite build with two kmp projects??
b
works perfectly fine, yes
f
ok, can you help me?? I have some trouble with the configuration. I have two projects: one main app and one library. main_app composeApp build.gradle.kts (1) settings.gradle.kts (2) library misc build.gradle.kts. (3) settings.gradle.kts (4) I added the following code on file (2)
Copy code
includeBuild("../library"){
    dependencySubstitution {
        substitute(module("br.com.me.library:misc")).using(project(":misc"))
    }
}
And on file (1) was added
implementation(project(":misc))
. When I build the project I am getting the following error:
Project with path ':misc' could not be found in project ':composeApp'.
Do you have som idea to solve the problem?
b
:misc is not part of project _main_app_. it is still only part of library. you need
implementation(project("br.com.me.library:misc"))
. The dependeny subsitution rule takes care of replacing this dependency with
../library/misc
. library is an included build, so these are still separate projects, even though the line is rather blurry and configurations from main app will partially bleed into library. This can cause some mess, which is why we have aligned the build setups throughout all our projects using a custom plugin, so composite builds will always work smoothly