Always run kotlinc in <withKotlin/> Ant task

This change requires withKotlin to be run with Ant of version at least 1.8.2.

Some test data changed because now compileList contains both Java and Kotlin
sources

 #KT-7870 Fixed
This commit is contained in:
Alexander Udalov
2015-06-02 16:14:38 +03:00
parent cbbf8dec7e
commit 6d00c265e2
9 changed files with 89 additions and 14 deletions
@@ -0,0 +1,14 @@
OUT:
Buildfile: [TestData]/build.xml
build:
[mkdir] Created dir: [Temp]/classes
[javac] Compiling 1 source file to [Temp]/classes
[javac] Compiling [[TestData]] => [[Temp]/classes]
[javac] Running javac...
[jar] Building jar: [Temp]/hello.jar
BUILD SUCCESSFUL
Total time: [time]
Return code: 0
@@ -0,0 +1,13 @@
<project name="Ant Task Test" default="build">
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
<target name="build">
<mkdir dir="${temp}/classes"/>
<javac srcdir="${test.data}" destdir="${temp}/classes" includeantruntime="false">
<withKotlin/>
</javac>
<jar destfile="${temp}/hello.jar">
<fileset dir="${temp}/classes"/>
</jar>
</target>
</project>
@@ -0,0 +1,5 @@
package hello
fun main(args: Array<String>) {
println("Hello!")
}
@@ -0,0 +1,4 @@
OUT:
Hello!
Return code: 0