diff --git a/.circleci/config.yml b/.circleci/config.yml index 8203bba7d..548febfda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,6 +151,9 @@ jobs: echo -e "android.useAndroidX=true" >> ./gradle.properties echo -e "android.enableJetifier=true" >> ./gradle.properties echo -e "FLIPPER_VERSION=0.51.0" >> ./gradle.properties + echo -e "APPLICATION_ID=chat.rocket.reactnative" >> ./gradle.properties + echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties + echo -e "BugsnagAPIKey=$BUGSNAG_KEY" >> ./gradle.properties if [[ $KEYSTORE ]]; then echo $KEYSTORE_BASE64 | base64 --decode > ./app/$KEYSTORE @@ -159,9 +162,6 @@ jobs: echo -e "KEY_ALIAS=$KEY_ALIAS" >> ./gradle.properties echo -e "KEY_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties fi - - echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties - echo -e "BugsnagAPIKey=$BUGSNAG_KEY" >> ./gradle.properties working_directory: android - run: @@ -246,6 +246,7 @@ jobs: echo -e "android.enableJetifier=true" >> ./gradle.properties echo -e "FLIPPER_VERSION=0.51.0" >> ./gradle.properties echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties + echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties if [[ $KEYSTORE ]]; then echo $KEYSTORE_BASE64 | base64 --decode > ./app/$KEYSTORE diff --git a/android/app/build.gradle b/android/app/build.gradle index 20544ff85..28518d655 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -140,7 +140,7 @@ android { } defaultConfig { - applicationId "chat.rocket.reactnative" + applicationId APPLICATION_ID minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode VERSIONCODE as Integer @@ -196,7 +196,7 @@ android { flavorDimensions "type" productFlavors { foss { - applicationId "chat.rocket.android" + applicationId APPLICATION_ID dimension = "type" buildConfigField "boolean", "FDROID_BUILD", "true" } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index bc6c63eab..5d83092fd 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,10 +1,9 @@ + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools" + package="chat.rocket.reactnative"> - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/java/chat/rocket/reactnative/MainApplication.java b/android/app/src/main/java/chat/rocket/reactnative/MainApplication.java index 149f1c7fe..33e246b55 100644 --- a/android/app/src/main/java/chat/rocket/reactnative/MainApplication.java +++ b/android/app/src/main/java/chat/rocket/reactnative/MainApplication.java @@ -19,6 +19,7 @@ import java.util.Arrays; import java.util.List; import chat.rocket.reactnative.generated.BasePackageList; +import chat.rocket.reactnative.networking.SSLPinningPackage; public class MainApplication extends Application implements ReactApplication { diff --git a/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningModule.java b/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningModule.java index 804e52601..6a690a180 100644 --- a/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningModule.java +++ b/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningModule.java @@ -1,4 +1,4 @@ -package chat.rocket.reactnative; +package chat.rocket.reactnative.networking; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; diff --git a/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningPackage.java b/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningPackage.java index f9d46cb35..cc8492434 100644 --- a/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningPackage.java +++ b/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningPackage.java @@ -1,4 +1,4 @@ -package chat.rocket.reactnative; +package chat.rocket.reactnative.networking; import java.util.Arrays; import java.util.Collections; diff --git a/android/app/src/play/AndroidManifest.xml b/android/app/src/play/AndroidManifest.xml index 9bbd460cb..3b9e80a3f 100644 --- a/android/app/src/play/AndroidManifest.xml +++ b/android/app/src/play/AndroidManifest.xml @@ -1,10 +1,9 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/android/gradle.properties b/android/gradle.properties index 26d0e8372..53184a938 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -29,6 +29,9 @@ android.enableJetifier=true # Version of flipper SDK to use with React Native FLIPPER_VERSION=0.51.0 +# Application ID +APPLICATION_ID=chat.rocket.reactnative + # App properties VERSIONCODE=999999999 BugsnagAPIKey="" \ No newline at end of file diff --git a/package.json b/package.json index c32581b2f..c8cafd9b6 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "ci": "npm run precommit && codecov", "ios": "npx react-native run-ios", "android": "npx react-native run-android --variant=playDebug", + "android-whitelabel": "npx react-native run-android --main-activity chat.rocket.reactnative.MainActivity --variant=playDebug --appId", "log-android": "react-native log-android", "snyk-protect": "snyk protect", "precommit": "eslint . && jest",