Skip to content

Commit

Permalink
Merge pull request #7 from anpigon/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
anpigon authored Jul 26, 2021
2 parents f4c5015 + 088b567 commit 93f7282
Show file tree
Hide file tree
Showing 63 changed files with 6,014 additions and 522 deletions.
45 changes: 34 additions & 11 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ project.ext.vectoricons = [
'FontAwesome5_Solid.ttf', 'FontAwesome5_Brands.ttf'] // <-- add this line (1/2)
]

apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" // <- add this line (2/2)
apply from: "../../node_modules/react-native/react.gradle"

apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
Expand All @@ -97,7 +98,7 @@ apply from: "../../node_modules/react-native/react.gradle"
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
def enableSeparateBuildPerCPUArchitecture = true

/**
* Run Proguard to shrink the Java bytecode in release builds.
Expand All @@ -123,7 +124,9 @@ def jscFlavor = 'org.webkit:android-jsc-intl:+'
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", true)
def enableHermes = project.ext.react.get("enableHermes", false)

def ndkDebugSymbolLevel = { debugSymbolLevel 'SYMBOL_TABLE' }

android {
compileSdkVersion rootProject.ext.compileSdkVersion
Expand All @@ -137,10 +140,11 @@ android {
applicationId "com.mobilekeychain.steem"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 33
versionName "1.3.11"
versionCode 35
versionName "1.3.12"
multiDexEnabled true
missingDimensionStrategy 'react-native-camera', 'general'
resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
}
splits {
abi {
Expand Down Expand Up @@ -168,18 +172,36 @@ android {
}
buildTypes {
debug {
debuggable true
minifyEnabled false
signingConfig signingConfigs.debug
versionNameSuffix "-debug"
manifestPlaceholders = [appName: "@string/app_name_dev"]
resValue "string", "CodePushDeploymentKey", '""'
}
releaseStaging {
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
shrinkResources true
debuggable false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
versionNameSuffix "-stage"
// applicationIdSuffix ".stage"
manifestPlaceholders = [appName: "@string/app_name_stage"]
resValue "string", "CodePushDeploymentKey", '"8uh_ISvzv9UQH5hDasp8_gqDFz_7Fx6TfMhI5"'
matchingFallbacks = ['release']
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
shrinkResources true
renderscriptDebuggable false
jniDebuggable false
debuggable false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
ndk {
debugSymbolLevel 'SYMBOL_TABLE'
}
ndk ndkDebugSymbolLevel
manifestPlaceholders = [appName: "@string/app_name"]
resValue "string", "CodePushDeploymentKey", '"HuhoDBRhg94PYjll-TlebOCODXzSU1_CaSiIk"'
}
}

Expand Down Expand Up @@ -211,7 +233,7 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

implementation platform("com.google.firebase:firebase-bom:28.2.1")
implementation "com.google.firebase:firebase-analytics"
Expand All @@ -232,6 +254,7 @@ dependencies {
def hermesPath = "../../node_modules/hermes-engine/android/"
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
releaseStagingImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

<application
android:name=".MainApplication"
android:label="@string/app_name"
android:label="${appName}"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:label="${appName}"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
Expand Down
3 changes: 3 additions & 0 deletions android/app/src/main/assets/appcenter-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"app_secret": "c6b085dd-b4fe-4eb0-83cb-3736a2486b02"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import android.webkit.WebView;
import com.microsoft.codepush.react.CodePush;

public class MainApplication extends Application implements ReactApplication {

Expand All @@ -38,10 +39,18 @@ protected List<ReactPackage> getPackages() {
return packages;
}

// 2. Override the getJSBundleFile method to let
// the CodePush runtime determine where to get the JS
// bundle location from on each app start
@Override
protected String getJSMainModuleName() {
return "index";
}

@Override
protected String getJSBundleFile() {
return CodePush.getJSBundleFile();
}
};

@Override
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<resources>
<string name="app_name">Steem Keychain</string>
<string name="app_name_dev">[D]Steem Keychain</string>
<string name="app_name_stage">[S]Steem Keychain</string>
<string name="appCenterCrashes_whenToSendCrashes" moduleConfig="true" translatable="false">DO_NOT_ASK_JAVASCRIPT</string>
<string name="appCenterAnalytics_whenToEnableAnalytics" moduleConfig="true" translatable="false">ALWAYS_SEND</string>
</resources>
11 changes: 9 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@ include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
include ':react-native-keychain'
project(':react-native-keychain').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keychain/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'

apply from: '../node_modules/react-native-unimodules/gradle.groovy'
includeUnimodulesProjects()

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
applyNativeModulesSettingsGradle(settings)

include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Loading from 'screens/Loading';
import {name as appName} from './app.json';
import {store, persistor} from 'store';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import codePush from 'react-native-code-push';

const Root = () => {
const [gateLifted, setGateLifted] = useState(false);
Expand All @@ -31,4 +32,9 @@ const Root = () => {
);
};

AppRegistry.registerComponent(appName, () => Root);
const codePushOptions = {
checkFrequency: codePush.CheckFrequency.ON_APP_START,
installMode: codePush.InstallMode.ON_NEXT_RESTART,
};

AppRegistry.registerComponent(appName, () => codePush(codePushOptions)(Root));
23 changes: 20 additions & 3 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'
platform :ios, '11.0'

target 'mobileKeychain' do
use_unimodules!
config = use_native_modules!

permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera/Permission-Camera.podspec"
use_react_native!(:path => config["reactNativePath"])

# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# or pod ‘Firebase/AnalyticsWithoutAdIdSupport’
# for Analytics without IDFA collection capability

# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods

target 'mobileKeychainTests' do
inherit! :complete
# Pods for testing
Expand All @@ -18,9 +29,15 @@ target 'mobileKeychain' do
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })
use_flipper!({ 'Flipper' => '0.87.0', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1' })
post_install do |installer|
flipper_post_install(installer)

installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
end

Expand Down
Loading

0 comments on commit 93f7282

Please sign in to comment.