From af5aff6789307acf555e566344aca0981b174d2d Mon Sep 17 00:00:00 2001 From: Filipe Brito Date: Thu, 26 Sep 2019 14:49:14 -0300 Subject: [PATCH] Add play files --- android/app/build.gradle | 51 ++-- android/app/google-services.json | 285 +++++++++++++++++- android/app/google-services.prod.json | 231 -------------- android/app/src/main/AndroidManifest.xml | 8 +- .../CustomPushNotification.java | 6 +- .../MainActivity.java | 2 +- .../MainApplication.java | 6 +- .../generated/BasePackageList.java | 2 +- .../share/ShareActivity.java | 2 +- .../share/ShareApplication.java | 4 +- android/build.gradle | 49 +-- 11 files changed, 336 insertions(+), 310 deletions(-) delete mode 100644 android/app/google-services.prod.json rename android/app/src/main/java/chat/rocket/{reactnative => android}/CustomPushNotification.java (94%) rename android/app/src/main/java/chat/rocket/{reactnative => android}/MainActivity.java (97%) rename android/app/src/main/java/chat/rocket/{reactnative => android}/MainApplication.java (94%) rename android/app/src/main/java/chat/rocket/{reactnative => android}/generated/BasePackageList.java (92%) rename android/app/src/main/java/chat/rocket/{reactnative => android}/share/ShareActivity.java (94%) rename android/app/src/main/java/chat/rocket/{reactnative => android}/share/ShareApplication.java (90%) diff --git a/android/app/build.gradle b/android/app/build.gradle index fc7baf740..97da1b2f7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -129,29 +129,28 @@ android { compileSdkVersion rootProject.ext.compileSdkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility rootProject.ext.javaVersion + targetCompatibility rootProject.ext.javaVersion } defaultConfig { - applicationId "chat.rocket.reactnative" + applicationId "chat.rocket.android" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode VERSIONCODE as Integer - versionName "1.20.0" + versionCode rootProject.ext.appCodeVersion + versionName rootProject.ext.appNameVersion vectorDrawables.useSupportLibrary = true manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String] } signingConfigs { release { - if (project.hasProperty('KEYSTORE')) { - storeFile file(KEYSTORE) - storePassword KEYSTORE_PASSWORD - keyAlias KEY_ALIAS - keyPassword KEY_PASSWORD - } + storeFile project.rootProject.file('chat-rocket-android.jks').getCanonicalFile() + storePassword System.getenv("CHAT_ROCKET_ANDROID_STORE_PASSWORD") + keyAlias System.getenv("CHAT_ROCKET_ANDROID_KEY_ALIAS") + keyPassword System.getenv("CHAT_ROCKET_ANDROID_KEY_PASSWORD") } + debug { storeFile project.rootProject.file('debug.keystore').getCanonicalFile() storePassword "android" @@ -159,6 +158,28 @@ android { keyPassword "android" } } + + buildTypes { + release { + minifyEnabled enableProguardInReleaseBuilds + setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro']) + signingConfig signingConfigs.release + } + } + + flavorDimensions "store" + + productFlavors { + play { + dimension "store" + } + + playExperimental { + dimension "store" + applicationId "chat.rocket.reactnative" + } + } + splits { abi { reset() @@ -167,13 +188,7 @@ android { include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } - buildTypes { - release { - minifyEnabled enableProguardInReleaseBuilds - setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro']) - signingConfig signingConfigs.release - } - } + // applicationVariants are e.g. debug, release applicationVariants.all { variant -> variant.outputs.each { output -> diff --git a/android/app/google-services.json b/android/app/google-services.json index 4b3f409be..a818e52b9 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -1,37 +1,304 @@ { "project_info": { - "project_number": "115198584049", - "firebase_url": "https://rocketchat-reactnative-test.firebaseio.com", - "project_id": "rocketchat-reactnative-test", - "storage_bucket": "rocketchat-reactnative-test.appspot.com" + "project_number": "673693445664", + "firebase_url": "https://rocketchat-9e9be.firebaseio.com", + "project_id": "rocketchat-9e9be", + "storage_bucket": "rocketchat-9e9be.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:115198584049:android:8be27b1f7c42a2ed", + "mobilesdk_app_id": "1:673693445664:android:6ef4638e500ec958", "android_client_info": { - "package_name": "chat.rocket.reactnative" + "package_name": "RocketChat" } }, "oauth_client": [ { - "client_id": "115198584049-ack609b1338b827fta26s9rd2ab1aad5.apps.googleusercontent.com", + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-vtcvuvso7k88gpodlpshod55g1ehs03s.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-sf7lqf11kk6vplg9ljh7pi491gvb08f3.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-fb71j3aqmafmm20jkj8gvpusv04fdnq8.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-ejd5lkbsdjoo5onc052dotsjacdh1kcc.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-ssfpeb0are3svvg0etbttog789s0n3ua.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyAWwowhAfACHBw3YxmDOXY3QyakgjhJLqc" + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" } ], "services": { + "analytics_service": { + "status": 1 + }, "appinvite_service": { + "status": 1, + "other_platform_oauth_client": [] + }, + "ads_service": { + "status": 2 + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:673693445664:android:16da2e50aff9f0c9", + "android_client_info": { + "package_name": "chat.rocket.android" + } + }, + "oauth_client": [ + { + "client_id": "673693445664-k0mvosdjoe5dbvqce3b377ckabb5dgu8.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "chat.rocket.android", + "certificate_hash": "33fa8582794176014a59054192e261bfad0e5273" + } + }, + { + "client_id": "673693445664-hrjftksij02vqtd467ln2cubvu48ft5j.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "chat.rocket.android", + "certificate_hash": "41cf750df786a6d9da712a98a629d0c8391876d6" + } + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-vtcvuvso7k88gpodlpshod55g1ehs03s.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-sf7lqf11kk6vplg9ljh7pi491gvb08f3.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-fb71j3aqmafmm20jkj8gvpusv04fdnq8.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-ejd5lkbsdjoo5onc052dotsjacdh1kcc.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-ssfpeb0are3svvg0etbttog789s0n3ua.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 2, "other_platform_oauth_client": [ { - "client_id": "115198584049-ack609b1338b827fta26s9rd2ab1aad5.apps.googleusercontent.com", + "client_id": "673693445664-pa3k48sg81r89rn65e9rlnu4gpmm5vem.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.konecty.rocket.chat" + } + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", "client_type": 3 } ] + }, + "ads_service": { + "status": 2 + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:673693445664:android:1551054db195f705", + "android_client_info": { + "package_name": "chat.rocket.android.dev" + } + }, + "oauth_client": [ + { + "client_id": "673693445664-t5aeku0oie010npd40a0tgn27c418vk7.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "chat.rocket.android.dev", + "certificate_hash": "41cf750df786a6d9da712a98a629d0c8391876d6" + } + }, + { + "client_id": "673693445664-iml14ln4vccuu7liclrpt2k671fkjs38.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "chat.rocket.android.dev", + "certificate_hash": "33fa8582794176014a59054192e261bfad0e5273" + } + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-vtcvuvso7k88gpodlpshod55g1ehs03s.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-sf7lqf11kk6vplg9ljh7pi491gvb08f3.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-fb71j3aqmafmm20jkj8gvpusv04fdnq8.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-ejd5lkbsdjoo5onc052dotsjacdh1kcc.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-ssfpeb0are3svvg0etbttog789s0n3ua.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 2, + "other_platform_oauth_client": [ + { + "client_id": "673693445664-pa3k48sg81r89rn65e9rlnu4gpmm5vem.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.konecty.rocket.chat" + } + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + } + ] + }, + "ads_service": { + "status": 2 + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:673693445664:android:64932c99863e2838", + "android_client_info": { + "package_name": "com.konecty.rocket.chat" + } + }, + "oauth_client": [ + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-vtcvuvso7k88gpodlpshod55g1ehs03s.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-sf7lqf11kk6vplg9ljh7pi491gvb08f3.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-fb71j3aqmafmm20jkj8gvpusv04fdnq8.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-ejd5lkbsdjoo5onc052dotsjacdh1kcc.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-3ajben08beuco6eout3kpod2gbbm8fij.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.konecty.rocket.chat", + "certificate_hash": "cd5806ba3f0141d0f2e47acfe64a485f575108ab" + } + }, + { + "client_id": "673693445664-ssfpeb0are3svvg0etbttog789s0n3ua.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 2, + "other_platform_oauth_client": [ + { + "client_id": "673693445664-pa3k48sg81r89rn65e9rlnu4gpmm5vem.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.konecty.rocket.chat" + } + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + } + ] + }, + "ads_service": { + "status": 2 } } } diff --git a/android/app/google-services.prod.json b/android/app/google-services.prod.json deleted file mode 100644 index f6e7e6b9a..000000000 --- a/android/app/google-services.prod.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "project_info": { - "project_number": "673693445664", - "firebase_url": "https://rocketchat-9e9be.firebaseio.com", - "project_id": "rocketchat-9e9be", - "storage_bucket": "rocketchat-9e9be.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:673693445664:android:6ef4638e500ec958", - "android_client_info": { - "package_name": "RocketChat" - } - }, - "oauth_client": [ - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "chat.rocket.reactnative" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:673693445664:android:16da2e50aff9f0c9", - "android_client_info": { - "package_name": "chat.rocket.android" - } - }, - "oauth_client": [ - { - "client_id": "673693445664-k0mvosdjoe5dbvqce3b377ckabb5dgu8.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "chat.rocket.android", - "certificate_hash": "33fa8582794176014a59054192e261bfad0e5273" - } - }, - { - "client_id": "673693445664-hrjftksij02vqtd467ln2cubvu48ft5j.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "chat.rocket.android", - "certificate_hash": "41cf750df786a6d9da712a98a629d0c8391876d6" - } - }, - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "chat.rocket.reactnative" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:673693445664:android:1551054db195f705", - "android_client_info": { - "package_name": "chat.rocket.android.dev" - } - }, - "oauth_client": [ - { - "client_id": "673693445664-t5aeku0oie010npd40a0tgn27c418vk7.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "chat.rocket.android.dev", - "certificate_hash": "41cf750df786a6d9da712a98a629d0c8391876d6" - } - }, - { - "client_id": "673693445664-iml14ln4vccuu7liclrpt2k671fkjs38.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "chat.rocket.android.dev", - "certificate_hash": "33fa8582794176014a59054192e261bfad0e5273" - } - }, - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "chat.rocket.reactnative" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:673693445664:android:8be27b1f7c42a2ed", - "android_client_info": { - "package_name": "chat.rocket.reactnative" - } - }, - "oauth_client": [ - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "chat.rocket.reactnative" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:673693445664:android:64932c99863e2838", - "android_client_info": { - "package_name": "com.konecty.rocket.chat" - } - }, - "oauth_client": [ - { - "client_id": "673693445664-3ajben08beuco6eout3kpod2gbbm8fij.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "com.konecty.rocket.chat", - "certificate_hash": "cd5806ba3f0141d0f2e47acfe64a485f575108ab" - } - }, - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "chat.rocket.reactnative" - } - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index f205a0311..84ca5a620 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,16 +1,16 @@ -// afterEvaluate { -// if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) { -// android { -// compileSdkVersion 28 -// buildToolsVersion "28.0.3" -// defaultConfig { -// targetSdkVersion 28 -// } -// } -// } -// } -// }