cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
432 stars 60 forks source link

Kapt broken in 1.0.74 #428

Closed ethauvin closed 7 years ago

ethauvin commented 7 years ago

Causes a compilation error:

Compilation errors, command:
C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe -d .\kobaltBuild\classes -classpath C:\Users\erik\.kobalt\cache\net\thauvin\erik\semver\0.9.7\semver-0.9.7.jar;C:\Users\erik\.kobalt\cache\org\jetbrains\annotations\13.0\annotations-13.0.jar;C:\Users\erik\.kobalt\cache\com\github\spullara\mustache\java\compiler\0.9.4\compiler-0.9.4.jar;C:\Users\erik\.kobalt\cache\org\jetbrains\kotlin\kotlin-stdlib\1.1.1\kotlin-stdlib-1.1.1.jar;C:\Users\erik\.kobalt\cache\org\jetbrains\kotlin\kotlin-stdlib\1.1.1\kotlin-stdlib-1.1.1.jar;.\kobaltBuild\generated\source\apt\classes;C:\Users\erik\.kobalt\cache\org\jetbrains\kotlin\kotlin-runtime\1.1.1\kotlin-runtime-1.1.1.jar;C:\Users\erik\.kobalt\cache\org\jetbrains\kotlin\kotlin-stdlib-js\1.1.1\kotlin-stdlib-js-1.1.1.jar;.\kobaltBuild\classes .\src\main\java\com\example\Example.java .\src\main\java\com\example\Example.java
Something went wrong running javac, need to switch to RunCommand
*****
***** ERROR Compilation errors, command:
C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe -d .\kobaltBuild\classes -classpath C:\Users\erik\.kobalt\cache\net\thauvin\erik\semver\0.9.7\semver-0.9.7.jar;C:\Users\erik\.kobalt\cache\org\jetbrains\annotations\13.0\annotations-13.0.jar;C:\Users\erik\.kobalt\cache\com\github\spullara\mustache\java\compiler\0.9.4\compiler-0.9.4.jar;C:\Users\erik\.kobalt\cache\org\jetbrains\kotlin\kotlin-stdlib\1.1.1\kotlin-stdlib-1.1.1.jar;C:\Users\erik\.kobalt\cache\org\jetbrains\kotlin\kotlin-stdlib\1.1.1\kotlin-stdlib-1.1.1.jar;.\kobaltBuild\generated\source\apt\classes;C:\Users\erik\.kobalt\cache\org\jetbrains\kotlin\kotlin-runtime\1.1.1\kotlin-runtime-1.1.1.jar;C:\Users\erik\.kobalt\cache\org\jetbrains\kotlin\kotlin-stdlib-js\1.1.1\kotlin-stdlib-js-1.1.1.jar;.\kobaltBuild\classes .\src\main\java\com\example\Example.java .\src\main\java\com\example\Example.java
Something went wrong running javac, need to switch to RunCommand
*****

Worked as is under 1.0.72. Example project has been updated:

./kobaltw run

You'll have to update the Build.kt file to point to the semver jar in the lib directory. I'm using my local repo for testing.

cbeust commented 7 years ago

The problem is because the projects are in the same directory and the second clean removes the generated files.

The proper solution is to support multiple run configurations, filed as #430.