Skip to content

Undocumented mandatory use for android:flavorizrGradle with android:buildGradle together #341

@oleksandrtilnyi-plentific

Description

Description

Environment

Flutter v3.27.1
flutter_flavorizr v2.4.0

Issue

I've been using custom set of instructions and it seems, that introducing flavorizr.gradle file via android:flavorizrGradle totally removed support for usual android:buildGradle instruction. Lines for importing flavorizr.gradle are added even if there's no android:flavorizrGradle defined in the list of instructions.

// ----- BEGIN flavorDimensions (autogenerated by flutter_flavorizr) -----
apply from: "flavorizr.gradle"
// ----- END flavorDimensions (autogenerated by flutter_flavorizr) -----

This makes build.gradle referenced to the file which is not being generated

Steps to reproduce

  • Define the flavorizr.yaml file with instructions which do not contain android:flavorizrGradle processor
  • Run dart run flutter_flavorizr
  • Observe adding reference to the file, while it's not being under android/app directory

Fix

Just adding an instruction android:flavorizrGradle fixes the issue.

So maybe this should be documented in the table of possible instructions, that android:flavorizrGradle and android:buildGradle must be used together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions