Skip to content

Commit 2bd85cc

Browse files
committed
Answer the obvious question to current sourse-set structure
1 parent 7bf63f3 commit 2bd85cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

kotlinx-coroutines-core/build.gradle

+9
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ For that, we have following compilations:
5353
* jvmCore compilation: [commonMain]
5454
* jdk8 compilation: [commonMain, jvmCoreMain]
5555
56+
Theoretically, "jvmCore" could've been "jvmMain", it is not for technical reasons,
57+
here is the explanation from Seb:
58+
59+
"""
60+
The jvmCore is theoretically not necessary. All code for jdk6 compatibility can be in jvmMain and jdk8 dependent code can be in jdk8Main.
61+
Effectively there is no reason for ever putting code into jvmCoreMain.
62+
However, when creating a new compilation, we have to take care of creating a defaultSourceSet. Without creating the jvmCoreMain source set,
63+
the creation of the compilation fails. That is the only reason for this source set.
64+
"""
5665
========================================================================== */
5766

5867
project.ext.sourceSetSuffixes = ["Main", "Test"]

0 commit comments

Comments
 (0)