markotron
11/06/2017, 10:25 AMprocessingEnv.options["kapt.kotlin.generated"]
. Although everything works, Intellij is not recognizing generated classes (shown as errors). I tried to add the generated folder as a source directory, but still nothing.. any ideas?
[11:13]
sourceSets {
main {
java {
srcDir "${buildDir.absolutePath}/generated/source/kaptKotlin/"
}
}
}
mannodermaus
11/06/2017, 11:35 PMyan
11/07/2017, 2:59 AMmarkotron
11/07/2017, 10:35 AMkapt3
. For example, I write an annotation processor, compile the project, and the code gets generated. Without changing anything I clean it and compile it again and the code is not generated. When I change something within the annotation processor, for example, I add a comment, clean, compile, and everything works. Basically, without changing anything, cleaning and compiling the project for the second time, doesn’t work. This doesn’t happen on previous version of kapt
.val source = javaClass.classLoader.getResource("template.vm").readText()
The problem is:
- I can load only a file with a .vm
extensions. Otherwise, I get the FileNotFoundException
. I don’t understand why this happens.yan
11/13/2017, 3:45 PM.class
files, for example? E.g., javaClass.classLoader.getResource("kotlin/Unit.class")
?markotron
11/16/2017, 4:01 PM.txt
file for the first time. The next time, if I change the extension, it will not work. I have to restart the gradle daemon to make it work. Basically, right now, before every compile, I kill the gradle process to be sure that the changes are applied.