Is doing file io (`File.exists()`) fine at configu...
# community-support
v
Is doing file io (
File.exists()
) fine at configuration time?
👍 1
j
Yes
👍 1
v
If you can avoid it, you want to avoid it though, as it becomes a configuration cache input. If you need the information to decide whether to register a specific task or similar, it is fine of course and proper, that it is a cc input.
v
Its just passing proguard file to AGP by convention (if its in correct place and named correctly it will get autopicked up with no extra config) So..idk? Can I avoid it? Or bad idea?
v
Not really familiar with AGP, but sounds like it might not be possible to avoid.
t
unless AGP quietly no-ops when passed a non-existent file, I'd say it's fine
v
it used to no-op, but now agp9 throws an error
t
yeah, then the existence check makes sense and doesn't violate any Gradle best practices
👍 1