How do I get the root directory of a referenced project in apt?


    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

) in process () .

but the return is Warning:Note: / Applications/Android Studio.app/Contents/bin/build/keep-build.txt

Aug.12,2021

use

kapt {
    arguments {
        arg("key", "value")
    }
}

get

from ProcessingEnvironment-sharpoptions
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d02f-2c33e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d02f-2c33e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?