Switch native-platform usages to regular dependency

This commit is contained in:
Ilya Chernikov
2017-11-09 16:26:47 +01:00
committed by Vyacheslav Gerasimov
parent 4a47fb3ffb
commit 78d2c655d5
5 changed files with 36 additions and 59 deletions
+13 -7
View File
@@ -1,3 +1,4 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
description = "Kotlin Daemon Client"
@@ -5,14 +6,21 @@ apply { plugin("kotlin") }
jvmTarget = "1.6"
val nativePlatformUberjar = preloadedDeps("native-platform-uberjar")
val nativePlatformVariants: List<String> by rootProject.extra
val fatJarContents by configurations.creating
dependencies {
compileOnly(project(":compiler:util"))
compileOnly(project(":compiler:cli-common"))
compileOnly(project(":compiler:daemon-common"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(nativePlatformUberjar)
compileOnly(commonDep("net.rubygrapefruit", "native-platform"))
fatJarContents(project(":compiler:daemon-common"))
fatJarContents(commonDep("net.rubygrapefruit", "native-platform"))
nativePlatformVariants.forEach {
fatJarContents(commonDep("net.rubygrapefruit", "native-platform", "-$it"))
}
}
sourceSets {
@@ -20,11 +28,9 @@ sourceSets {
"test" {}
}
runtimeJar {
nativePlatformUberjar.forEach {
from(zipTree(it))
}
from(getSourceSetsFrom(":compiler:daemon-common")["main"].output.classesDirs)
runtimeJar(task<ShadowJar>("shadowJar")) {
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
from(fatJarContents)
}
sourcesJar()
javadocJar()