Anton Popov
07/23/2021, 3:45 PM.kt
and .java
, get placed, when crating them using CodeGenerator? Will they get included in apk (in android project)?
Use-case: I would like to transfer processed info from one compilation module to another in this file (just text file), and use it while processing another module. Right now I just place this "transfer file" in /module-name/build/generated/myProcessorName/transferFile
, but I have A LOT of problems with gradle: after gradle clean
my processor doesn't run (presumably gets in gradle cache) and, consequently, doesn't produce this transfer file. In gradle logs I see > Task :module-name:kspDebugKotlin FROM-CACHE
. Will this problem go away if I will use CodeGenerator to create this transfer file? If yes, how can I do so without including the transfer file in final build artifact (apk)?Anton Popov
07/27/2021, 7:16 AMJiaxiang
07/27/2021, 7:45 AMJiaxiang
07/27/2021, 7:46 AMJiaxiang
07/27/2021, 7:48 AMAnton Popov
07/27/2021, 7:57 AMAnton Popov
07/27/2021, 8:19 AMfun OutputStream.filename(): String? = runCatching {
val pathField = FileOutputStream::class.java.getDeclaredField("path")
pathField.isAccessible = true
pathField.get(this as FileOutputStream) as String
}.getOrNull()
Ugly, but works