Add preprocessed JVM stdlib sources as common sources
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<kotlin-home>${kotlin-dist}/kotlinc</kotlin-home>
|
<kotlin-home>${kotlin-dist}/kotlinc</kotlin-home>
|
||||||
|
<pp-profile>JS</pp-profile>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -28,6 +29,33 @@
|
|||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
<version>1.7</version>
|
<version>1.7</version>
|
||||||
<executions>
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>common-sources</id>
|
||||||
|
<phase>process-sources</phase>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<delete dir="${basedir}/target/common-sources" failonerror="false"/>
|
||||||
|
<mkdir dir="${basedir}/target/common-sources"/>
|
||||||
|
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${kotlin-home}/lib/kotlin-preloader.jar"/>
|
||||||
|
</classpath>
|
||||||
|
<assertions>
|
||||||
|
<enable/>
|
||||||
|
</assertions>
|
||||||
|
<arg value="-cp"/>
|
||||||
|
<arg value="${kotlin-home}/lib/kotlin-compiler.jar"/>
|
||||||
|
<arg value="org.jetbrains.kotlin.preprocessor.PreprocessorCLI"/>
|
||||||
|
<arg value="${basedir}/../src/kotlin"/>
|
||||||
|
<arg value="${basedir}/target/common-sources"/>
|
||||||
|
<arg value="${pp-profile}"/>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>serialize-declarations</id>
|
<id>serialize-declarations</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
@@ -41,8 +69,8 @@
|
|||||||
|
|
||||||
<path id="src.path">
|
<path id="src.path">
|
||||||
<union>
|
<union>
|
||||||
<fileset dir="${basedir}/../src/kotlin">
|
<fileset dir="${basedir}/target/common-sources">
|
||||||
<include name="internal/Annotations.kt" />
|
<include name="**/*.kt" />
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<fileset dir="${basedir}/src">
|
<fileset dir="${basedir}/src">
|
||||||
|
|||||||
Reference in New Issue
Block a user