Add externalAnnotations ant test and ant-1.8

This commit is contained in:
Erokhin Stanislav
2013-10-25 21:35:52 +04:00
parent 694eed595b
commit 2c93ace78d
20 changed files with 209 additions and 18 deletions
@@ -0,0 +1,12 @@
OUT Buildfile: [TestData]/build.xml
OUT
OUT build:
OUT [mkdir] Created dir: [Temp]/classes
OUT [javac] Compiling 1 source file to [Temp]/classes
OUT [javac] Compiling [[[TestData]/root1]] => [[Temp]/classes]
OUT [javac] Running javac...
OUT [jar] Building jar: [Temp]/hello.jar
OUT
OUT BUILD SUCCESSFUL
OUT Total time: [time]
Return code: 0
@@ -0,0 +1,23 @@
<project name="Ant Task Test" default="build">
<path id="classpath">
<fileset dir="${idea.sdk}/lib" includes="annotations.jar"/>
<fileset dir="${kotlin.home}" includes="kotlin-runtime.jar"/>
</path>
<typedef name = "withKotlin" classname = "org.jetbrains.jet.buildtools.ant.KotlinCompilerAdapter"/>
<target name="build">
<delete dir="${temp}/classes" failonerror="false"/>
<mkdir dir="${temp}/classes"/>
<javac destdir="${temp}/classes" includeAntRuntime="false" srcdir="${test.data}/root1">
<classpath refid="classpath"/>
<withKotlin externalannotations="${test.data}/root1/b/">
<externalannotations path="${test.data}/root1/a/" />
</withKotlin>
</javac>
<jar destfile="${temp}/hello.jar">
<fileset dir="${temp}/classes"/>
</jar>
</target>
</project>
@@ -0,0 +1,3 @@
OUT Hello, a!
OUT Java Hello
Return code: 0
@@ -0,0 +1,5 @@
<root>
<item name='j.Java java.lang.String f()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
</root>
@@ -0,0 +1,5 @@
<root>
<item name='j.Java java.lang.String f2()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
</root>
@@ -0,0 +1,9 @@
package hello
fun main(args : Array<String>) {
for (s in arrayList("a"))
println("Hello, $s!")
val java: String = j.Java().f()
val hello: String = j.Java().f2()
println("$java $hello")
}
@@ -0,0 +1,20 @@
package j;
import org.jetbrains.annotations.NotNull;
import java.lang.String;
import java.lang.System;
public class Java {
public String f() {
return "Java";
}
public String f2() {
return "Hello";
}
public static void main(String[] args) {
hello.HelloPackage.main(new String[] {});
}
}