From 815f8874658aec5682b9fa8b9809e8a043cc980e Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Fri, 29 Dec 2017 20:18:14 +0700 Subject: [PATCH] [build] Fix gradle plugin shadowJar building and uploading --- gradle/loadRootProperties.gradle | 4 +++- tools/kotlin-native-gradle-plugin/build.gradle | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gradle/loadRootProperties.gradle b/gradle/loadRootProperties.gradle index 70c749e351d..25edb22f83b 100644 --- a/gradle/loadRootProperties.gradle +++ b/gradle/loadRootProperties.gradle @@ -10,5 +10,7 @@ file("$rootDir/gradle.properties").withReader { rootProperties.load(it) } rootProperties.each { k, v -> - ext.set(k, v) + if (!project.hasProperty(k)) { + ext.set(k, v) + } } diff --git a/tools/kotlin-native-gradle-plugin/build.gradle b/tools/kotlin-native-gradle-plugin/build.gradle index c394df2a600..6487127cc27 100644 --- a/tools/kotlin-native-gradle-plugin/build.gradle +++ b/tools/kotlin-native-gradle-plugin/build.gradle @@ -67,12 +67,18 @@ task pluginMetadata { } } +configurations { + bundleDependencies { + transitive = false + } +} + dependencies { compile 'org.jetbrains.kotlin:kotlin-native-shared' compile "org.jetbrains.kotlin:kotlin-stdlib:$buildKotlinVersion" compile gradleApi() - shadow "org.jetbrains.kotlin:kotlin-native-shared" + bundleDependencies 'org.jetbrains.kotlin:kotlin-native-shared' testCompile gradleTestKit() testCompile 'junit:junit:4.12' @@ -82,6 +88,11 @@ dependencies { testRuntime files(pluginMetadata) } +shadowJar { + configurations = [project.configurations.bundleDependencies] + classifier = null +} + test { if (project.hasProperty("konan.home")) { systemProperty("konan.home", project.property("konan.home"))