0

I have 4+ build flavors and 2 dimensions in Android.

build.gradle (:app):

flavorDimensions 'first', 'second'
productFlavors {

    // first dimension
    one {
        dimension 'first'
        manifestPlaceholders = [
            firstName: 'one'
        ]
        ...
    }
    two {
        dimension 'first'
        manifestPlaceholders = [
            firstName: 'good-app'
        ]
        // manifestPlaceholders = [
            // firstName: 'nice-app'
        // ]
        ...
    }
    ...

    // second dimension
    once {
        dimension 'second'
        manifestPlaceholders = [
            secondName: 'once'
        ]
        ...
    }

    twice {
        dimension 'second'
        manifestPlaceholders = [
            secondName: 'twice'
        ]
        ...
    }
    ...
}

AndroidManifest.xml:

<application
            android:label="${firstName}-${secondName}"
    ...
>

I want to make the app names of each Build Variants:

Build Variant -> App Name
oneOnceDebug -> one-once
oneTwiceDebug -> one-twice
...
twoOnceDebug -> good-app (not two/once)
twoTwiceDebug -> nice-app (not two/twice)

oneOnceDebug and oneTwiceDebug are OK, but twoOnceDebug and twoTwiceDebug are wrong names.

How can I change the app names for twoOnceDebug and twoTwiceDebug?

refresh
  • 11
  • 3

0 Answers0