Skip to content

Added option to specify applicationId for Android builds - #8867

Closed
enterline wants to merge 1 commit into
react:masterfrom
enterline:android-appId
Closed

Added option to specify applicationId for Android builds#8867
enterline wants to merge 1 commit into
react:masterfrom
enterline:android-appId

Conversation

@enterline

@enterlineenterline commented Jul 18, 2016

Copy link
Copy Markdown

Allow optional applicationId build parameter. eg:

 react-native run-android --variant=DevEnvDebug --applicationId=com.awesomeproject.devenv

It will then start the app with something like this:

Starting the app on 192.168.59.101:5555 (/Users/wenterline/Library/Android/sdk/platform-tools/adb -s 192.168.59.101:5555 shell am start -n com.awesomeproject.devenv/com.awesomeproject.MainActivity)...

Many times in Android, we have the need to set a different applicationId for different build variants. eg:

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.awesomeproject"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
...
productFlavors {
all {
}
ProdEnv {
}
DevEnv {
applicationId "com.awesomeproject.devenv"
}
}
...
}

This should address issue #8308

Test plan (required)

We have been using this modified version of runAndroid for quite some time. I have tested with and without the parameter and builds that have different application ids and builds that do not.

@ghost

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @burgalon and @jimthedev to be potential reviewers.

@ghostghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jul 18, 2016
@satya164

Copy link
Copy Markdown
Contributor

cc @Kureev

can we not detect it automatically?

@ghostghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 5, 2016
@ghost

Copy link
Copy Markdown

It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request we identified @grabbou as a potential reviewer. Could you take a look please or cc someone with more context?

@ghostghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 17, 2016
@satya164

Copy link
Copy Markdown
Contributor

ping @Kureev@grabbou

@ghostghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 17, 2016
@Kureev

Copy link
Copy Markdown
Contributor

Not that familiar with the subj. Is it something very common for every Android developer, @satya164?

@ghostghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2016
@satya164

Copy link
Copy Markdown
Contributor

@Kureev For background,

We currently support specifying build flavors for Android. They are just variants of the same app with some differences and a different application id. But run-android doesn't launch the correct flavor and always run the app with the default application id.

What I'd prefer is to automatically detect the application id and launch it instead of having to specify the application id. It's pretty common to have build flavors for different environments on android.

@ghostghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2016
@Kureev

Copy link
Copy Markdown
Contributor

If there is a way to do it automatically, I'd like to kindly ask @enterline to change current implementation.

@ghostghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2016
@alenia

Copy link
Copy Markdown

@Kureev it's possible that #8950 is an attempt to do it automatically? I haven't actually checked though.

@enterline

Copy link
Copy Markdown
Author

@alenia, @Kureev I just tested #8950 locally and after a minor bug fix, it worked great!. I think that we can close this PR and proceed with #8950.

I will comment on the small bug I found.

@ghostghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 22, 2016
@KureevKureev closed this Aug 22, 2016
@vivekparekh8

vivekparekh8 commented Oct 20, 2016

Copy link
Copy Markdown

Waiting for #8950 to update

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@enterline@satya164@Kureev@alenia@vivekparekh8@wenterline-godaddy