CLI, Ant: add kotlin-reflect.jar to classpath by default, support "-no-reflect"
Note that now "-no-stdlib" implies "-no-reflect". #KT-13237 Fixed
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package test;
|
||||
|
||||
import kotlin.reflect.KClassesKt;
|
||||
import kotlin.Unit;
|
||||
|
||||
public class J {}
|
||||
@@ -0,0 +1,22 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/classes
|
||||
[javac] Compiling 1 source file to [Temp]/classes
|
||||
[javac] Running javac...
|
||||
[javac] [TestData]/J.java:3: cannot find symbol
|
||||
[javac] symbol : class KClassesKt
|
||||
[javac] location: package kotlin.reflect
|
||||
[javac] import kotlin.reflect.KClassesKt;
|
||||
[javac] ^
|
||||
[javac] 1 error
|
||||
|
||||
ERR:
|
||||
|
||||
BUILD FAILED
|
||||
[TestData]/build.xml:6: Compile failed; see the compiler error output for details.
|
||||
|
||||
Total time: [time]
|
||||
|
||||
Return code: 1
|
||||
@@ -0,0 +1,12 @@
|
||||
<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>
|
||||
<compilerarg value="-no-reflect"/>
|
||||
</withKotlin>
|
||||
</javac>
|
||||
</target>
|
||||
</project>
|
||||
Reference in New Issue
Block a user