@@ -2,11 +2,12 @@ buildscript {
2
2
ext. kotlin_version = " 1.1.0-rc-91"
3
3
4
4
repositories {
5
- mavenCentral ()
5
+ jcenter ()
6
6
maven { url ' http://dl.bintray.com/kotlin/kotlin-eap-1.1' }
7
7
}
8
8
dependencies {
9
9
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
10
+ classpath ' com.github.jengelman.gradle.plugins:shadow:1.2.4'
10
11
}
11
12
}
12
13
@@ -21,18 +22,63 @@ allprojects {
21
22
}
22
23
23
24
dependencies {
24
- compile " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
25
25
testCompile " org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version "
26
26
testCompile " junit:junit:4.12"
27
27
}
28
28
}
29
+ apply plugin : ' com.github.johnrengelman.shadow'
30
+
31
+ configurations {
32
+ shadowed
33
+ compile. extendsFrom(shadow)
34
+ compile. extendsFrom(shadowed)
35
+ }
29
36
30
37
dependencies {
31
- compile project(' :pcollections' )
38
+ shadow " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
39
+
40
+ shadowed project(' :pcollections' )
41
+
32
42
}
33
43
34
44
project(' tests' ) {
35
45
dependencies {
36
- compile parent
46
+ compile project( path : ' :kotlinx-collections-immutable ' , configuration : ' shadow ' )
37
47
}
38
- }
48
+ }
49
+
50
+ compileKotlin {
51
+ kotlinOptions. jdkHome = JDK_16
52
+ }
53
+
54
+
55
+
56
+ apply plugin : ' maven-publish'
57
+
58
+ jar {
59
+ // baseName "${parent.name}-${project.name}"
60
+ }
61
+
62
+ shadowJar {
63
+ classifier = null
64
+ configurations = [project. configurations. shadowed]
65
+ relocate ' org.pcollections' , ' kotlinx.collections.immutable.internal.org.pcollections'
66
+ }
67
+
68
+ task sourcesJar (type : Jar ) {
69
+ from sourceSets. main. allSource
70
+ classifier " sources"
71
+ }
72
+
73
+ publishing {
74
+ publications {
75
+ mainPublication(MavenPublication ) {
76
+ from components. shadow
77
+ artifact sourcesJar
78
+
79
+ pom. withXml {
80
+ asNode(). dependencies. ' *' . each { it. scope* . value = ' compile' }
81
+ }
82
+ }
83
+ }
84
+ }
0 commit comments