Hi. It seems that source sets can depend on anothe...
# multiplatform
v
Hi. It seems that source sets can depend on another mpp project only via
main
compilation. Custom compilation isn’t working. Is this expected? Example: I added two modules with
Copy code
jvm() {
    compilations.create('a') {
        defaultSourceSet.dependsOn sourceSets.commonMain
    }
    compilations.create('b') {
        defaultSourceSet.dependsOn sourceSets.commonMain
    }
}
Then I added dependency from one to another like so
Copy code
// This from `first-module/build.gradle`
sourceSets {
    commonMain {
        dependencies {
            implementation project(':another-module')
        }
    }
}
And then I run a compilation of the first module like so
./gradlew :first-module:compileAKotlinJvm
. Then
:other-module:compileAKotlinJvm
is never run in this case, just
:other-module:compileKotlinJvm
(which is compilation task for
main
compilation).