Skip to content

Commit 2bc0a1b

Browse files
committed
Add common source into sources jar to work around KT-20971
1 parent c0563cf commit 2bc0a1b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

gradle/publish-bintray.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ apply plugin: 'maven'
44
apply plugin: 'maven-publish'
55
apply plugin: 'com.jfrog.bintray'
66

7+
def platform = platformOf(project)
8+
def coroutines_core = platformLib("kotlinx-coroutines-core", platform)
9+
710
// --------------- pom configuration ---------------
811

912
def pomConfig = {
@@ -30,9 +33,13 @@ def pomConfig = {
3033

3134
// ------------- tasks
3235

33-
task sourcesJar(type: Jar, dependsOn: classes) {
36+
task sourcesJar(type: Jar) {
3437
classifier = 'sources'
3538
from sourceSets.main.allSource
39+
if (project.name == coroutines_core && platform != "common") {
40+
// add common source, too
41+
from rootProject.file("common/$project.name-common/src/main/kotlin")
42+
}
3643
}
3744

3845
publishing {

0 commit comments

Comments
 (0)