From 3f638b8677bbee7f033aef2a1d0ac34ed629dd35 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Thu, 22 Dec 2016 16:50:00 +0300 Subject: [PATCH] Kapt: Fix kapt3 on Linux (KT-15375) --- ...tlin-annotation-processing-maven-build.txt | 9 ++++++ .../kotlin-annotation-processing/pom.xml | 31 ++++++++++++++----- 2 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 libraries/tools/kotlin-annotation-processing/kotlin-annotation-processing-maven-build.txt diff --git a/libraries/tools/kotlin-annotation-processing/kotlin-annotation-processing-maven-build.txt b/libraries/tools/kotlin-annotation-processing/kotlin-annotation-processing-maven-build.txt new file mode 100644 index 00000000000..038fc782c57 --- /dev/null +++ b/libraries/tools/kotlin-annotation-processing/kotlin-annotation-processing-maven-build.txt @@ -0,0 +1,9 @@ +The presence of this file enables the "tools_jar_profile" profile in kotlin-annotation-processing, + which adds "tools.jar" to the compile dependencies. + +When Gradle loads this artifact, the "tools_jar_profile" profile should not be activated + (cause it adds an extra dependency from the path based on the environment variable). + +It wouldn't in fact because: +1. This file is normally absent when Gradle build with kapt is launched; +2. Gradle poorly supports Maven profiles. \ No newline at end of file diff --git a/libraries/tools/kotlin-annotation-processing/pom.xml b/libraries/tools/kotlin-annotation-processing/pom.xml index 697e1b0dfab..a93f6f96806 100755 --- a/libraries/tools/kotlin-annotation-processing/pom.xml +++ b/libraries/tools/kotlin-annotation-processing/pom.xml @@ -56,13 +56,6 @@ 1.1.0 provided - - jdk - tools - system - 1.8 - ${env.JDK_18}/lib/tools.jar - @@ -184,4 +177,28 @@ + + + + tools_jar_profile + + false + + kotlin-annotation-processing-maven-build.txt + + + + ${env.JDK_18}/lib/tools.jar + + + + com.sun + tools + 1.8.0 + system + ${toolsjar} + + + +