From 82f9757138a288fa8ebb1e92c8a9c8da64f4cba6 Mon Sep 17 00:00:00 2001 From: Vyacheslav Gerasimov Date: Fri, 19 Apr 2019 17:55:22 +0300 Subject: [PATCH] Build: Fix dependency leak on :kotlin-compiler in kotlin-native-library-reader Introduce mavenCompileScope to manage compile records in pom.xml --- konan/library-reader/build.gradle.kts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/konan/library-reader/build.gradle.kts b/konan/library-reader/build.gradle.kts index db1836e410b..ed8e78a2d5b 100644 --- a/konan/library-reader/build.gradle.kts +++ b/konan/library-reader/build.gradle.kts @@ -1,8 +1,17 @@ +import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer.COMPILE + plugins { + maven kotlin("jvm") id("jps-compatible") } +val mavenCompileScope by configurations.creating { + the() + .conf2ScopeMappings + .addMapping(0, this, COMPILE) +} + description = "Kotlin/Native deserializer and library reader" dependencies { @@ -13,7 +22,7 @@ dependencies { compileOnly(project(":compiler:cli-common")) // This dependency is necessary to keep the right dependency record inside of POM file: - compile(projectRuntimeJar(":kotlin-compiler")) + mavenCompileScope(projectRuntimeJar(":kotlin-compiler")) compile(project(":kotlin-native:kotlin-native-utils")) }