Support inline true/false options
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlinc] Compiling [[[TestData]/hello.kt]] => [[Temp]/hello.jar]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/jet/buildtools/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar" inline="false"/>
|
||||
</target>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package hello
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
for (s in arrayList("a"))
|
||||
println("Hello, $s!")
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
OUT:
|
||||
Hello, a!
|
||||
|
||||
Return code: 0
|
||||
@@ -0,0 +1,31 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
|
||||
ERR:
|
||||
|
||||
BUILD FAILED
|
||||
[TestData]/build.xml:5: org.jetbrains.jet.cli.jvm.compiler.CompileEnvironmentException: Wrong value for inline option: 'wrong'. Should be 'on'/'off' or 'true'/'false'
|
||||
at org.jetbrains.jet.buildtools.ant.BytecodeCompilerTask.execute(BytecodeCompilerTask.java:146)
|
||||
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
|
||||
at java.lang.reflect.Method.invoke(Method.java:597)
|
||||
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
|
||||
at org.apache.tools.ant.Task.perform(Task.java:348)
|
||||
at org.apache.tools.ant.Target.execute(Target.java:390)
|
||||
at org.apache.tools.ant.Target.performTasks(Target.java:411)
|
||||
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
|
||||
at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
|
||||
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
|
||||
at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
|
||||
at org.apache.tools.ant.Main.runBuild(Main.java:801)
|
||||
at org.apache.tools.ant.Main.startAnt(Main.java:218)
|
||||
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
|
||||
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
|
||||
|
||||
Total time: [time]
|
||||
|
||||
Return code: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/jet/buildtools/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar" inline="wrong"/>
|
||||
</target>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package hello
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
for (s in arrayList("a"))
|
||||
println("Hello, $s!")
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user