As the title suggests I want to apply a plugin in my build.gradle
iff a certain properties file exists in the project folder. The following attempt
buildscript {
File c = file('crashlytics.properties')
ext {
crashlytics = c.exists();
}
}
if (crashlytics) {
apply plugin: 'io.fabric'
}
//...
results in the following error message
No such property: verboseGradlePlugin for class: java.lang.Boolean
Is there a way to achieve what I want?
You can try:
if (project.file('crashlytics.properties').exists()) {
apply plugin: 'io.fabric'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With