override fun process(set: Set<TypeElement>, roundEnvironment: RoundEnvironment): Boolean {
if (once.compareAndSet(false, true)) {
log("once!!")
val rootProject = File("").absoluteFile
val build = File(rootProject, "build/keep-build.txt")
log(build.absolutePath)
if (build.exists()) {
build.delete()
}
build.createNewFile()
}
return false
}
I wrote a apt
project A
, and I want to generate a non- java
file in process ()
.
then my other java
project B
uses this apt
project A
.
I want to get the root directory of the project B
that uses it in this A
project.
I tried to get File (""). AbsoluteFile
process ()
.
but the return is Warning:Note: / Applications/Android Studio.app/Contents/bin/build/keep-build.txt