-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support intermediate SourceSets #38
Labels
Comments
yshrsmz
added
enhancement
New feature or request
help wanted
Extra attention is needed
labels
Aug 24, 2020
As it may take some time to resolve the issue, I am planning to release a version for Kotlin 1.4 without supporting this. |
kotlin {
android()
jvm {
compilations.all {
kotlinOptions.jvmTarget = "1.8"
}
testRuns["test"].executionTask.configure {
useJUnit()
}
}
js(IR) {
browser()
}
js("node") {
nodejs()
}
macosX64()
linuxX64()
mingwX64()
ios()
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting
val jvmTest by getting
val appMain by creating {
dependsOn(commonMain)
}
val androidMain by getting {
dependsOn(appMain)
}
val jsCommonMain by creating {
dependsOn(commonMain)
}
val jsMain by getting {
dependsOn(jsCommonMain)
}
val nodeMain by getting {
dependsOn(jsCommonMain)
}
val jsTest by getting
val desktopMain by creating {
dependsOn(appMain)
}
val macosX64Main by getting {
dependsOn(desktopMain)
}
val linuxX64Main by getting {
dependsOn(desktopMain)
}
val mingwX64Main by getting {
dependsOn(desktopMain)
}
}
}
In this case, BuildKonfig should be created for each source sets. Here's the source-set hierarchy.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
blocked by #36related: #56
Kotlin 1.4.0 adds support for the hierarchical project structure.
So how can we support this?
Say I have a configuration above.
Currently, BuildKonfig does not generate an object for
iosMain
, simply ignore it as there's no target namedios
. We need to declareiosX64
andiosArm64
intargetConfigs
.To generate objects for intermediate SourceSets, we need to check SourceSets' dependencies.
In
BuildKonfigPlugin
,If target is
iosX64
and that is defined viaios()
, thisdependentSourceSets
should have aiosMain
SourceSets.The text was updated successfully, but these errors were encountered: