How do I clear kotlinc scripts cache?
# scripting
b
How do I clear kotlinc scripts cache?
m
(but my TEMP is empty 🤷 )
Ah found it! ~/Library/Caches/main.kts.compiled.cache/
I opened this for the next time I'll be looking for this: https://github.com/Kotlin/kotlin-script-examples/pull/9/files
b
Thanks!
j
Can it be in a more accessible directory?, I am sharing scripts among multiple teams and OSs and having something similar to
.gradle
but
.kotlin
or
kotlinc
in the user home. Indeed thanks to @mbonnin I know where it is for macOS, but I have to search for it in Windows now.
I am trying to find this folder in GitHub Actions (Ubuntu) and I am not being able to cache it, I don't find the directory
main.kts.compiled.cache
I tried to get that property directly and the only file inside of that temp directory is a
README.md
🤷
i
Reposting the comment from the the issue: Just as a possible workaround, the
KOTLIN_MAIN_KTS_COMPILED_SCRIPTS_CACHE_DIR
environment variable could be used to point out to the specific cache directory. The only limitation is that in this case, the directory should exist and be accessible for the host. The same is possible with the JVM system property
kotlin.main.kts.compiled.scripts.cache.dir
.
j
Thank you! I will try it
358 Views