Set failOnError = true by default in kotlinc Ant task as in javac
#KT-8742 Fixed
This commit is contained in:
@@ -34,7 +34,7 @@ public abstract class KotlinCompilerBaseTask : Task() {
|
|||||||
public var nowarn: Boolean = false
|
public var nowarn: Boolean = false
|
||||||
public var verbose: Boolean = false
|
public var verbose: Boolean = false
|
||||||
public var printVersion: Boolean = false
|
public var printVersion: Boolean = false
|
||||||
public var failOnError: Boolean = false
|
public var failOnError: Boolean = true
|
||||||
|
|
||||||
public var noStdlib: Boolean = false
|
public var noStdlib: Boolean = false
|
||||||
|
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
OUT:
|
||||||
|
Buildfile: [TestData]/build.xml
|
||||||
|
|
||||||
|
build:
|
||||||
|
[kotlinc] Compiling [[TestData]] => [[Temp]]
|
||||||
|
[kotlinc] [TestData]/incorrectKotlinCode.kt:1:5: error: expecting a top level declaration
|
||||||
|
[kotlinc] xxxx
|
||||||
|
[kotlinc] ^
|
||||||
|
[kotlinc] [TestData]/incorrectKotlinCode.kt:1:1: error: unresolved reference: xxxx
|
||||||
|
[kotlinc] xxxx
|
||||||
|
[kotlinc] ^
|
||||||
|
|
||||||
|
ERR:
|
||||||
|
|
||||||
|
BUILD FAILED
|
||||||
|
[TestData]/build.xml:5: Compile failed; see the compiler error output for details.
|
||||||
|
|
||||||
|
Total time: [time]
|
||||||
|
|
||||||
|
Return code: 1
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<project name="Ant Task Test" default="build">
|
||||||
|
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||||
|
|
||||||
|
<target name="build">
|
||||||
|
<kotlinc src="${test.data}" output="${temp}"/>
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
xxxx
|
||||||
@@ -47,6 +47,12 @@ public class AntTaskTestGenerated extends AbstractAntTaskTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("failOnErrorByDefault")
|
||||||
|
public void testFailOnErrorByDefault() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/failOnErrorByDefault/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("helloWorld")
|
@TestMetadata("helloWorld")
|
||||||
public void testHelloWorld() throws Exception {
|
public void testHelloWorld() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/helloWorld/");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/helloWorld/");
|
||||||
|
|||||||
Reference in New Issue
Block a user