From c0f5bd14de410798239f5d9bca1e5244a055b942 Mon Sep 17 00:00:00 2001 From: Igor Mandrigin Date: Wed, 13 Feb 2019 09:48:10 +0100 Subject: [PATCH] Revert "change App ID for PRs on Android to avoid replacing release" This reverts commit 6a7efb8339c1d0359dd0084779211bb871cdafff. Signed-off-by: Igor Mandrigin --- android/app/build.gradle | 18 ++------ android/app/src/debug/res/values/strings.xml | 2 +- android/app/src/main/res/values/strings.xml | 3 +- android/app/src/pr/AndroidManifest.xml | 7 ---- android/app/src/pr/google-services.json | 42 ------------------- android/app/src/pr/res/values/strings.xml | 3 -- .../app/src/release/res/values/strings.xml | 3 -- ci/android.groovy | 13 ++---- fastlane/Fastfile | 11 ++--- 9 files changed, 14 insertions(+), 88 deletions(-) delete mode 100644 android/app/src/pr/AndroidManifest.xml delete mode 100644 android/app/src/pr/google-services.json delete mode 100644 android/app/src/pr/res/values/strings.xml delete mode 100644 android/app/src/release/res/values/strings.xml diff --git a/android/app/build.gradle b/android/app/build.gradle index d16064aab1..683fa0ca8e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -5,10 +5,8 @@ apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.grad import com.android.build.OutputFile /** - * The react.gradle file registers a task for each build variant: - * - bundlePrJsAndAssets - * - bundleDebugJsAndAssets - * - bundleReleaseJsAndAssets + * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets + * and bundleReleaseJsAndAssets). * These basically call `react-native bundle` with the correct arguments during the Android build * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the * bundle directly from the development server. Below you can see all the possible configurations @@ -76,9 +74,8 @@ import com.android.build.OutputFile * ] */ project.ext.react = [ - nodeExecutableAndArgs: ["node", "--max-old-space-size=8192"], - entryFile: "index.android.js", - bundleInPr: true, + nodeExecutableAndArgs: ["node", "--max-old-space-size=8192"], + entryFile: "index.android.js" ] apply from: "../../node_modules/react-native/react.gradle" @@ -206,13 +203,6 @@ android { proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" signingConfig signingConfigs.release } - pr { - initWith release - applicationIdSuffix ".pr" - versionNameSuffix ".pr" - resValue "string", "app_name", "Status PR" - matchingFallbacks = ["debug", "release"] - } } // applicationVariants are e.g. debug, release applicationVariants.all { variant -> diff --git a/android/app/src/debug/res/values/strings.xml b/android/app/src/debug/res/values/strings.xml index c7db857287..fd27483b60 100644 --- a/android/app/src/debug/res/values/strings.xml +++ b/android/app/src/debug/res/values/strings.xml @@ -1,3 +1,3 @@ Status Debug - + \ No newline at end of file diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 16d83f115d..1a7dca9247 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,6 +1,7 @@ + Status Your phone appears to be ROOTED, by pressing CONTINUE you understand and accept the risks in using this software. Continue Exit status-im - + \ No newline at end of file diff --git a/android/app/src/pr/AndroidManifest.xml b/android/app/src/pr/AndroidManifest.xml deleted file mode 100644 index daa2f037e6..0000000000 --- a/android/app/src/pr/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/android/app/src/pr/google-services.json b/android/app/src/pr/google-services.json deleted file mode 100644 index df831f5356..0000000000 --- a/android/app/src/pr/google-services.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "project_info": { - "project_number": "854811651919", - "firebase_url": "https://status-react-app.firebaseio.com", - "project_id": "status-react-app", - "storage_bucket": "status-react-app.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:854811651919:android:11ee7444ded8a00a", - "android_client_info": { - "package_name": "im.status.ethereum.pr" - } - }, - "oauth_client": [ - { - "client_id": "854811651919-gua52csicclb5p9gr4eeu33ukk0aaphj.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyAOF4W1j8GYeXzzVKRfNKlXywD6bx0rJtQ" - } - ], - "services": { - "analytics_service": { - "status": 1 - }, - "appinvite_service": { - "status": 1, - "other_platform_oauth_client": [] - }, - "ads_service": { - "status": 2 - } - } - } - ], - "configuration_version": "1" -} diff --git a/android/app/src/pr/res/values/strings.xml b/android/app/src/pr/res/values/strings.xml deleted file mode 100644 index 5bc6dcce61..0000000000 --- a/android/app/src/pr/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Status PR - diff --git a/android/app/src/release/res/values/strings.xml b/android/app/src/release/res/values/strings.xml deleted file mode 100644 index 917ca04be8..0000000000 --- a/android/app/src/release/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Status - diff --git a/ci/android.groovy b/ci/android.groovy index cf61713939..1395a46e31 100644 --- a/ci/android.groovy +++ b/ci/android.groovy @@ -3,16 +3,9 @@ cmn = load 'ci/common.groovy' def bundle(type = 'nightly') { /* Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon */ def gradleOpt = "-PbuildUrl='${currentBuild.absoluteUrl}' -Dorg.gradle.daemon=false " - def target = "release" - - if (type in ['pr', 'e2e']) { - /* PR builds shouldn't replace normal releases */ - target = 'pr' - } else if (type == 'release') { + if (type == 'release') { gradleOpt += "-PreleaseVersion='${cmn.version()}'" } - env.APK_PATH = "android/app/build/outputs/apk/${target}/app-${target}.apk" - dir('android') { withCredentials([ string( @@ -25,11 +18,11 @@ def bundle(type = 'nightly') { passwordVariable: 'STATUS_RELEASE_KEY_PASSWORD' ) ]) { - sh "./gradlew assemble${target.capitalize()} ${gradleOpt}" + sh "./gradlew assembleRelease ${gradleOpt}" } } def pkg = cmn.pkgFilename(type, 'apk') - sh "cp ${env.APK_PATH} ${pkg}" + sh "cp android/app/build/outputs/apk/release/app-release.apk ${pkg}" return pkg } diff --git a/fastlane/Fastfile b/fastlane/Fastfile index aa03023721..925ff3d5d5 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -226,15 +226,12 @@ end platform :android do - # Optional env variables - APK_PATH = ENV["APK_PATH"] || "android/app/build/outputs/apk/release/app-release.apk" - desc "Deploy a new internal build to Google Play" desc "expects GOOGLE_PLAY_JSON_KEY environment variable" lane :nightly do upload_to_play_store( track: "internal", - apk: APK_PATH, + apk: "android/app/build/outputs/apk/release/app-release.apk", json_key_data: ENV["GOOGLE_PLAY_JSON_KEY"] ) @@ -245,7 +242,7 @@ platform :android do lane :release do upload_to_play_store( track: "alpha", - apk: APK_PATH, + apk: "android/app/build/outputs/apk/release/app-release.apk", json_key_data: ENV["GOOGLE_PLAY_JSON_KEY"] ) end @@ -269,7 +266,7 @@ platform :android do desc "---" desc "Output: writes `fastlane/diawi.out` file url of the uploded file" lane :upload_diawi do - upload_to_diawi(APK_PATH) + upload_to_diawi("android/app/build/outputs/apk/release/app-release.apk") end desc "`fastlane android saucelabs` - upload .apk to sauce labs" @@ -280,7 +277,7 @@ platform :android do desc "will fails if file isn't there" lane :saucelabs do upload_to_saucelabs( - APK_PATH + "android/app/build/outputs/apk/release/app-release.apk" ) end end