669c7ec326
- "kotlin-maven-plugin" is pulled up to the main POM - "testFilterIntoLinkedList" test commented out - stdlib - including "kotlin-runtime" respects "localKotlin" profile
170 lines
6.9 KiB
XML
170 lines
6.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
|
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kotlin-project</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>stdlib</artifactId>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kunit</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
|
|
<properties>
|
|
<temp-directory>${project.build.directory}/temp</temp-directory>
|
|
<kotlin-maven-plugin-dir>${temp-directory}/kotlin-maven-plugin</kotlin-maven-plugin-dir>
|
|
<kotlin-runtime-dir>${temp-directory}/kotlin-runtime</kotlin-runtime-dir>
|
|
|
|
<!-- DO NOT update manually or through -D, it is set to "true" by "localKotlin" profile -->
|
|
<localKotlin>false</localKotlin>
|
|
</properties>
|
|
|
|
|
|
<build>
|
|
<sourceDirectory>${project.basedir}/src</sourceDirectory>
|
|
<testSourceDirectory>${project.basedir}/test</testSourceDirectory>
|
|
|
|
<plugins>
|
|
|
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
<!-- Unpacking "kotlin-maven-plugin" to get its "ivyconf.xml" -->
|
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
|
|
<plugin>
|
|
<groupId>com.github.goldin</groupId>
|
|
<artifactId>copy-maven-plugin</artifactId>
|
|
<version>${kotlin-maven-plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>unpack-ivyconf</id>
|
|
<goals>
|
|
<goal>copy</goal>
|
|
</goals>
|
|
<phase>initialize</phase>
|
|
<configuration>
|
|
<runIf>! Boolean.valueOf( localKotlin )</runIf>
|
|
<resource>
|
|
<targetPath>${kotlin-maven-plugin-dir}</targetPath>
|
|
<dependency>
|
|
<groupId>com.github.goldin</groupId>
|
|
<artifactId>kotlin-maven-plugin</artifactId>
|
|
<version>${kotlin-maven-plugin.version}</version>
|
|
</dependency>
|
|
<unpack>true</unpack>
|
|
</resource>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
<!-- Copying "kotlin-runtime" dependency -->
|
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
|
|
<plugin>
|
|
<groupId>com.github.goldin</groupId>
|
|
<artifactId>ivy-maven-plugin</artifactId>
|
|
<version>${kotlin-maven-plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-kotlin-runtime</id>
|
|
<goals>
|
|
<goal>ivy</goal>
|
|
</goals>
|
|
<phase>generate-sources</phase>
|
|
<configuration>
|
|
<runIf>! Boolean.valueOf( localKotlin )</runIf>
|
|
<ivyconf>${kotlin-maven-plugin-dir}/ivyconf.xml</ivyconf>
|
|
<dir>${kotlin-runtime-dir}</dir>
|
|
<dependency>
|
|
<groupId>ivy.org</groupId>
|
|
<artifactId>bt344</artifactId>
|
|
<version>latest.lastSuccessful</version>
|
|
<classifier>kotlin-runtime</classifier>
|
|
</dependency>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
<!-- Unpacking "kotlin-runtime" dependency -->
|
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
|
|
<plugin>
|
|
<groupId>com.github.goldin</groupId>
|
|
<artifactId>copy-maven-plugin</artifactId>
|
|
<version>${kotlin-maven-plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>unpack-kotlin-runtime</id>
|
|
<goals>
|
|
<goal>copy</goal>
|
|
</goals>
|
|
<phase>process-sources</phase>
|
|
<configuration>
|
|
<runIf>! Boolean.valueOf( localKotlin )</runIf>
|
|
<resource>
|
|
<targetPath>${project.build.outputDirectory}</targetPath>
|
|
<directory>${kotlin-runtime-dir}</directory>
|
|
<include>*.jar</include>
|
|
<unpack>true</unpack>
|
|
</resource>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>localKotlin</id>
|
|
<properties>
|
|
<localKotlin>true</localKotlin>
|
|
</properties>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.github.goldin</groupId>
|
|
<artifactId>copy-maven-plugin</artifactId>
|
|
<version>${kotlin-maven-plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-runtime</id>
|
|
<goals>
|
|
<goal>copy</goal>
|
|
</goals>
|
|
<phase>initialize</phase>
|
|
<configuration>
|
|
<resource>
|
|
<targetPath>${project.build.outputDirectory}</targetPath>
|
|
<directory>${kotlin-sdk}/../classes/runtime</directory>
|
|
<include>**/*.class</include>
|
|
<preservePath>true</preservePath>
|
|
</resource>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
|
|
</project>
|