Kapt: Fix kapt3 on Linux (KT-15375)
This commit is contained in:
committed by
Yan Zhulanow
parent
8a9c858d78
commit
3f638b8677
+9
@@ -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.
|
||||
@@ -56,13 +56,6 @@
|
||||
<version>1.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jdk</groupId>
|
||||
<artifactId>tools</artifactId>
|
||||
<scope>system</scope>
|
||||
<version>1.8</version>
|
||||
<systemPath>${env.JDK_18}/lib/tools.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -184,4 +177,28 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>tools_jar_profile</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
<file>
|
||||
<exists>kotlin-annotation-processing-maven-build.txt</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<properties>
|
||||
<toolsjar>${env.JDK_18}/lib/tools.jar</toolsjar>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sun</groupId>
|
||||
<artifactId>tools</artifactId>
|
||||
<version>1.8.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${toolsjar}</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user