-
Notifications
You must be signed in to change notification settings - Fork 32
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
Rework source sets to have rich hierarchy #130
Changes from 3 commits
bb352e1
fb19284
dcb4c4e
1521740
ea75083
be2a4fb
0580d3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,90 +58,84 @@ kotlin { | |
linuxArm32Hfp() | ||
} | ||
} | ||
|
||
sourceSets { | ||
commonMain { | ||
dependencies { | ||
// can remove this once https://youtrack.jetbrains.com/issue/KT-40333 is fixed | ||
implementation(kotlin("stdlib-common")) | ||
} | ||
} | ||
commonTest { | ||
val commonMain by getting | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
} | ||
|
||
val nix64MainSourceDirs = listOf( | ||
"src/nonJvmMain/kotlin", | ||
"src/nativeMain/kotlin", | ||
"src/nix64Main/kotlin" | ||
) | ||
|
||
val nix32MainSourceDirs = listOf( | ||
"src/nonJvmMain/kotlin", | ||
"src/nativeMain/kotlin", | ||
"src/nix32Main/kotlin" | ||
) | ||
|
||
if (HostManager.hostIsMac) { | ||
val jsMain by getting { | ||
kotlin.srcDir("src/nonJvmMain/kotlin") | ||
} | ||
|
||
val appleMain32SourceDirs = listOf( | ||
"src/appleMain/kotlin" | ||
) + nix32MainSourceDirs | ||
|
||
val appleMain64SourceDirs = listOf( | ||
"src/appleMain/kotlin" | ||
) + nix64MainSourceDirs | ||
|
||
val macosX64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val macosX64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val macosArm64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val macosArm64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val iosArm64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val iosArm64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val iosArm32Main by getting { kotlin.srcDirs(appleMain32SourceDirs) } | ||
val iosArm32Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val iosX64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val iosX64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val iosSimulatorArm64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val iosSimulatorArm64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val watchosArm32Main by getting { kotlin.srcDirs(appleMain32SourceDirs) } | ||
val watchosArm32Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val watchosArm64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val watchosArm64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val watchosX64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val watchosX64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val watchosX86Main by getting { kotlin.srcDirs(appleMain32SourceDirs) } | ||
val watchosX86Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val watchosSimulatorArm64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val watchosSimulatorArm64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val tvosArm64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val tvosArm64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val tvosX64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val tvosX64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val tvosSimulatorArm64Main by getting { kotlin.srcDirs(appleMain64SourceDirs) } | ||
val tvosSimulatorArm64Test by getting { kotlin.srcDir("src/appleTest/kotlin") } | ||
val nonJvmMain by creating { dependsOn(commonMain) } | ||
val nonJvmTest by creating { dependsOn(commonTest) } | ||
val jsMain by getting { dependsOn(nonJvmMain) } | ||
val jsTest by getting { dependsOn(nonJvmTest) } | ||
Comment on lines
+72
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like jsMain doesn't exist. guessing it's named differently between the IR and non-IR JS variants There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i would comment this out, list the tasks, see what the names are like, and update based on that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. weird, I'm not really sure how it was compiling previously, because |
||
val nativeMain by creating { dependsOn(nonJvmMain) } | ||
val nativeTest by creating { dependsOn(nonJvmTest) } | ||
val nix64Main by creating { dependsOn(nativeMain) } | ||
val nix64Test by creating { dependsOn(nativeTest) } | ||
val nix32Main by creating { dependsOn(nativeMain) } | ||
val nix32Test by creating { dependsOn(nativeTest) } | ||
val appleMain by creating { dependsOn(nativeMain) } | ||
val appleTest by creating { dependsOn(nativeTest) } | ||
val apple64Main by creating { | ||
dependsOn(appleMain) | ||
dependsOn(nix64Main) | ||
} | ||
val apple64Test by creating { | ||
dependsOn(appleTest) | ||
dependsOn(nix64Test) | ||
} | ||
val apple32Main by creating { | ||
dependsOn(appleMain) | ||
dependsOn(nix32Main) | ||
} | ||
val apple32Test by creating { | ||
dependsOn(appleTest) | ||
dependsOn(nix32Test) | ||
} | ||
val iosX64Main by getting { dependsOn(apple64Main) } | ||
val iosX64Test by getting { dependsOn(apple64Test) } | ||
val iosArm64Main by getting { dependsOn(apple64Main) } | ||
val iosArm64Test by getting { dependsOn(apple64Test) } | ||
val macosX64Main by getting { dependsOn(apple64Main) } | ||
val macosX64Test by getting { dependsOn(apple64Test) } | ||
val macosArm64Main by getting { dependsOn(apple64Main) } | ||
val macosArm64Test by getting { dependsOn(apple64Test) } | ||
val iosArm32Main by getting { dependsOn(apple32Main) } | ||
val iosArm32Test by getting { dependsOn(apple32Test) } | ||
val iosSimulatorArm64Main by getting { dependsOn(apple64Main) } | ||
val iosSimulatorArm64Test by getting { dependsOn(apple64Test) } | ||
val watchosArm32Main by getting { dependsOn(apple32Main) } | ||
val watchosArm32Test by getting { dependsOn(apple32Test) } | ||
val watchosArm64Main by getting { dependsOn(apple64Main) } | ||
val watchosArm64Test by getting { dependsOn(apple64Test) } | ||
val watchosX64Main by getting { dependsOn(apple64Main) } | ||
val watchosX64Test by getting { dependsOn(apple64Test) } | ||
val watchosX86Main by getting { dependsOn(apple32Main) } | ||
val watchosX86Test by getting { dependsOn(apple32Test) } | ||
val watchosSimulatorArm64Main by getting { dependsOn(apple64Main) } | ||
val watchosSimulatorArm64Test by getting { dependsOn(apple64Test) } | ||
val tvosArm64Main by getting { dependsOn(apple64Main) } | ||
val tvosArm64Test by getting { dependsOn(apple64Test) } | ||
val tvosX64Main by getting { dependsOn(apple64Main) } | ||
val tvosX64Test by getting { dependsOn(apple64Test) } | ||
val tvosSimulatorArm64Main by getting { dependsOn(apple64Main) } | ||
val tvosSimulatorArm64Test by getting { dependsOn(apple64Test) } | ||
|
||
if (HostManager.hostIsMingw || HostManager.hostIsMac) { | ||
val mingwX64Main by getting { | ||
kotlin.srcDirs( | ||
listOf( | ||
"src/nonJvmMain/kotlin", | ||
"src/nativeMain/kotlin", | ||
"src/mingwMain/kotlin" | ||
) | ||
) | ||
} | ||
val mingwX64Test by getting { | ||
kotlin.srcDir("src/mingwTest/kotlin") | ||
} | ||
val mingwMain by creating { dependsOn(nativeMain) } | ||
val mingwTest by creating { dependsOn(nativeTest) } | ||
val mingwX64Main by getting { dependsOn(mingwMain) } | ||
val mingwX64Test by getting { dependsOn(mingwTest) } | ||
} | ||
|
||
if (HostManager.hostIsLinux || HostManager.hostIsMac) { | ||
val linuxX64Main by getting { kotlin.srcDirs(nix64MainSourceDirs) } | ||
val linuxArm32HfpMain by getting { kotlin.srcDirs(nix32MainSourceDirs) } | ||
val linuxX64Main by getting { dependsOn(nix64Main) } | ||
val linuxX64Test by getting { dependsOn(nix64Test) } | ||
val linuxArm32HfpMain by getting { dependsOn(nix32Main) } | ||
val linuxArm32HfpTest by getting { dependsOn(nix32Test) } | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol (the date)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will try to release today, but no promises!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the date? looks correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it looks fine. It's just optimistic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, heh. Not a rush at all!
I thought I messed up the month/day order, but you've been using a sane system since the beginning :)