I want to apply some plugins optionally to improve build time in development time.
I mean I have this:
app/gradle.build.kts:
plugins {
id("com.android.application")
id("com.google.firebase.crashlytics")
}
But I dont want to apply firebase crashlytics plugin all the time (and other plugins like perf monitor), but if I try to access the project inside of the plugins block I get:
plugins {
id("com.android.application")
if (!project.hasProperty("build_fast")) {
id("com.google.firebase.crashlytics")
}
}
I get:
'val Build_gradle.project: Project' can't be called in this context by implicit receiver. Use the explicit one if necessary
So my questions are:
I can access the System env variables with
System.getenv("CI")but replacing those values from android studio is a little bit hacky currently to me, someone can show a way to update those variables?How can I do it using
project.hasPropperty("")?