Skip to content

Conversation

@cbrevik
Copy link
Contributor

@cbrevik cbrevik commented Mar 31, 2020

Summary:

Ref. discussion in #1085

Upgrade to CLI v4.4 breaks normal usage of --appIdSuffix. Bug was introduced with 19ac71f#diff-b668aefc66b33ed6e984d3467db0abc1R54 where appIdSuffix is concatenated to variant in order to generate the run task name.

The suffix should probably only be used to launch the correct package, and not for deciding what to build. If the user needs to specify some build type + flavor, the best thing is to put the full variant name in --variant.

Test Plan:

  1. Create a new React Native project
  2. Add an applicationIdSuffix to the debug buildType in android/app/build.gradle:
    buildTypes {
        debug {
            applicationIdSuffix ".debug"
            signingConfig signingConfigs.debug
        }
    }
  1. Run npx react-native run-android --appIdSuffix debug to verify that just appIdSuffix works
  2. Add a product flavor in android/app/build.gradle:
    flavorDimensions "version"
    productFlavors {
        demo {
            dimension "version"
            applicationIdSuffix ".demo"
        }
    }
  1. Run npx react-native run-android --appIdSuffix demo.debug --variant demoDebug to verify that variant and appIdSuffix works.

@thymikee thymikee requested a review from krizzu March 31, 2020 14:34
@thymikee
Copy link
Member

Not sure why I put appIdSuffix there, likely a leftover from previous attempt to that PR.

@thymikee thymikee changed the title fix: don't use appidsuffix to generate run task fix: don't use appIdSuffix to generate run task Mar 31, 2020
@thymikee thymikee merged commit 1675af5 into react-native-community:master Mar 31, 2020
cbrevik added a commit to AtB-AS/mittatb-app that referenced this pull request Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants