2

Is it possible to change a buildType attribute like debuggable for a specific build flavor?

I am trying setting it up using applicationVariants like this:

applicationVariants.all { variant ->
    if (variant.name == "flavorQuaRelease") {
        variant.buildType.debuggable = true
    }
}

but got this error:

Cannot set readonly property: debuggable for class: com.android.build.gradle.internal.api.ReadOnlyBuildType

Looks like a dead end.

I have 4 flavours, 2 build types. If i do by adding another build type i will have 24 different build options. Too much. Should be a better way to do it.

MiguelSlv
  • 14,067
  • 15
  • 102
  • 169

0 Answers0