Add actual sources to compiler and daemon client jars

This commit is contained in:
Ilya Chernikov
2017-03-29 16:57:05 +02:00
parent 88652154c9
commit a309511adf
3 changed files with 57 additions and 19 deletions
+15 -1
View File
@@ -801,7 +801,7 @@
</target> </target>
<target name="compiler-client-embeddable"> <target name="compiler-client-embeddable">
<cleandir dir="${output}/classes/android-extensions/compiler-client-embeddable"/> <cleandir dir="${output}/classes/compiler-client-embeddable"/>
<javac2 destdir="${output}/classes/compiler-client-embeddable" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"> <javac2 destdir="${output}/classes/compiler-client-embeddable" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
<withKotlin modulename="compiler-deps"> <withKotlin modulename="compiler-deps">
<compilerarg value="-version"/> <compilerarg value="-version"/>
@@ -832,6 +832,20 @@
<attribute name="Class-Path" value="kotlin-stdlib.jar"/> <attribute name="Class-Path" value="kotlin-stdlib.jar"/>
</manifest> </manifest>
</jarjar> </jarjar>
<jar jarfile="${output}/kotlin-compiler-client-embeddable-sources.jar">
<fileset dir="compiler/cli/cli-common/src"/>
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<zipfileset src="${output}/kotlin-daemon-client-sources.jar"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.client.embeddable.sources}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
</target> </target>
<target name="android-extensions-compiler"> <target name="android-extensions-compiler">
@@ -24,22 +24,34 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>build-helper-maven-plugin</artifactId>
<version>2.6</version> <version>1.7</version>
<executions> <executions>
<execution> <execution>
<id>empty-sources-jar</id> <id>attach-artifacts</id>
<phase>package</phase> <phase>compile</phase>
<goals> <goals>
<goal>jar</goal> <goal>attach-artifact</goal>
</goals> </goals>
<configuration> <configuration>
<skipIfEmpty>false</skipIfEmpty> <artifacts>
<classifier>sources</classifier> <artifact>
<classesDirectory>${basedir}/sources</classesDirectory> <file>${kotlin-dist}/kotlin-compiler-client-embeddable-sources.jar</file>
<type>jar</type>
<classifier>sources</classifier>
</artifact>
</artifacts>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>attach-empty-javadoc</id>
<phase>prepare-package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
</execution>
</executions> </executions>
</plugin> </plugin>
+21 -9
View File
@@ -25,22 +25,34 @@
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>build-helper-maven-plugin</artifactId>
<version>2.6</version> <version>1.7</version>
<executions> <executions>
<execution> <execution>
<id>empty-sources-jar</id> <id>attach-artifacts</id>
<phase>package</phase> <phase>compile</phase>
<goals> <goals>
<goal>jar</goal> <goal>attach-artifact</goal>
</goals> </goals>
<configuration> <configuration>
<skipIfEmpty>false</skipIfEmpty> <artifacts>
<classifier>sources</classifier> <artifact>
<classesDirectory>${basedir}/sources</classesDirectory> <file>${kotlin-dist}/kotlin-daemon-client-sources.jar</file>
<type>jar</type>
<classifier>sources</classifier>
</artifact>
</artifacts>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>attach-empty-javadoc</id>
<phase>prepare-package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
</execution>
</executions> </executions>
</plugin> </plugin>