|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
def getPassword(String currentUser, String keyChain) { |
|
|
|
|
def stdout = new ByteArrayOutputStream() |
|
|
|
|
def stderr = new ByteArrayOutputStream() |
|
|
|
|
def stdout = new ByteArrayOutputStream() |
|
|
|
|
def stderr = new ByteArrayOutputStream() |
|
|
|
|
if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) { |
|
|
|
|
exec { |
|
|
|
|
commandLine 'security', '-q', 'find-generic-password', '-a', currentUser, '-s', keyChain, '-w' |
|
|
|
@ -12,7 +12,7 @@ def getPassword(String currentUser, String keyChain) { |
|
|
|
|
exec { |
|
|
|
|
// In order for this to work you need to store it: |
|
|
|
|
// secret-tool store --label='mm' server mm user mm key mm-upload-key |
|
|
|
|
commandLine 'secret-tool', 'lookup', 'server', currentUser, 'user', currentUser, 'key', keyChain |
|
|
|
|
commandLine 'secret-tool', 'lookup', 'server', currentUser, 'user', currentUser, 'key', keyChain |
|
|
|
|
standardOutput = stdout |
|
|
|
|
errorOutput = stderr |
|
|
|
|
ignoreExitValue true |
|
|
|
@ -20,23 +20,23 @@ def getPassword(String currentUser, String keyChain) { |
|
|
|
|
} else { |
|
|
|
|
throw new GradleException('Unsupported OS! Only MacOSx and Linux are supported') |
|
|
|
|
} |
|
|
|
|
//noinspection GroovyAssignabilityCheck |
|
|
|
|
stdout.toString().trim() |
|
|
|
|
//noinspection GroovyAssignabilityCheck |
|
|
|
|
stdout.toString().trim() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
buildscript { |
|
|
|
|
repositories { |
|
|
|
|
maven { url 'https://maven.fabric.io/public' } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dependencies { |
|
|
|
|
// These docs use an open ended version so that our plugin |
|
|
|
|
// can be updated quickly in response to Android tooling updates |
|
|
|
|
|
|
|
|
|
// We recommend changing it to the latest version from our changelog: |
|
|
|
|
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin |
|
|
|
|
classpath 'io.fabric.tools:gradle:1.+' |
|
|
|
|
} |
|
|
|
|
repositories { |
|
|
|
|
maven { url 'https://maven.fabric.io/public' } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dependencies { |
|
|
|
|
// These docs use an open ended version so that our plugin |
|
|
|
|
// can be updated quickly in response to Android tooling updates |
|
|
|
|
|
|
|
|
|
// We recommend changing it to the latest version from our changelog: |
|
|
|
|
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin |
|
|
|
|
classpath 'io.fabric.tools:gradle:1.+' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
apply plugin: "com.android.application" |
|
|
|
@ -45,7 +45,7 @@ apply plugin: 'io.fabric' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
repositories { |
|
|
|
|
maven { url 'https://maven.fabric.io/public' } |
|
|
|
|
maven { url 'https://maven.fabric.io/public' } |
|
|
|
|
jcenter() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -76,8 +76,8 @@ import com.android.build.OutputFile |
|
|
|
|
* // whether to bundle JS and assets in another build variant (if configured). |
|
|
|
|
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants |
|
|
|
|
* // The configuration property can be in the following formats |
|
|
|
|
* // 'bundleIn${productFlavor}${buildType}' |
|
|
|
|
* // 'bundleIn${buildType}' |
|
|
|
|
* // 'bundleIn${productFlavor}${buildType}' |
|
|
|
|
* // 'bundleIn${buildType}' |
|
|
|
|
* // bundleInFreeDebug: true, |
|
|
|
|
* // bundleInPaidRelease: true, |
|
|
|
|
* // bundleInBeta: true, |
|
|
|
@ -86,8 +86,8 @@ import com.android.build.OutputFile |
|
|
|
|
* // for example: to disable dev mode in the staging build type (if configured) |
|
|
|
|
* devDisabledInStaging: true, |
|
|
|
|
* // The configuration property can be in the following formats |
|
|
|
|
* // 'devDisabledIn${productFlavor}${buildType}' |
|
|
|
|
* // 'devDisabledIn${buildType}' |
|
|
|
|
* // 'devDisabledIn${productFlavor}${buildType}' |
|
|
|
|
* // 'devDisabledIn${buildType}' |
|
|
|
|
* |
|
|
|
|
* // the root of your project, i.e. where "package.json" lives |
|
|
|
|
* root: "../../", |
|
|
|
@ -122,7 +122,7 @@ import com.android.build.OutputFile |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
project.ext.react = [ |
|
|
|
|
entryFile: "index.js" |
|
|
|
|
entryFile: "index.js" |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
apply from: "../../node_modules/react-native/react.gradle" |
|
|
|
@ -147,13 +147,13 @@ def enableProguardInReleaseBuilds = false |
|
|
|
|
* override fabric properties file if MM_FABRIC_API_KEY is set |
|
|
|
|
*/ |
|
|
|
|
def buildFabricPropertiesIfNeeded() { |
|
|
|
|
def FABRIC_API_KEY = System.getenv('MM_FABRIC_API_KEY') |
|
|
|
|
if (FABRIC_API_KEY) { |
|
|
|
|
def commentMessage = "AUTOGEN FABRIC PROPERTIES" |
|
|
|
|
ant.propertyfile(file: "fabric.properties", comment: commentMessage) { |
|
|
|
|
entry(key: "apiKey", value: FABRIC_API_KEY) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
def FABRIC_API_KEY = System.getenv('MM_FABRIC_API_KEY') |
|
|
|
|
if (FABRIC_API_KEY) { |
|
|
|
|
def commentMessage = "AUTOGEN FABRIC PROPERTIES" |
|
|
|
|
ant.propertyfile(file: "fabric.properties", comment: commentMessage) { |
|
|
|
|
entry(key: "apiKey", value: FABRIC_API_KEY) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
android { |
|
|
|
@ -163,138 +163,138 @@ android { |
|
|
|
|
buildFabricPropertiesIfNeeded() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion |
|
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion |
|
|
|
|
|
|
|
|
|
compileOptions { |
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8 |
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
defaultConfig { |
|
|
|
|
applicationId "io.metamask" |
|
|
|
|
minSdkVersion rootProject.ext.minSdkVersion |
|
|
|
|
targetSdkVersion rootProject.ext.targetSdkVersion |
|
|
|
|
versionCode 26 |
|
|
|
|
versionName "0.2.13" |
|
|
|
|
multiDexEnabled true |
|
|
|
|
testBuildType System.getProperty('testBuildType', 'debug') |
|
|
|
|
missingDimensionStrategy "minReactNative", "minReactNative46" |
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
|
|
|
|
ndk { |
|
|
|
|
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" |
|
|
|
|
} |
|
|
|
|
dexOptions { |
|
|
|
|
javaMaxHeapSize "2048M" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
manifestPlaceholders = [ |
|
|
|
|
MM_BRANCH_KEY_TEST: "$System.env.MM_BRANCH_KEY_TEST", |
|
|
|
|
MM_BRANCH_KEY_LIVE: "$System.env.MM_BRANCH_KEY_LIVE", |
|
|
|
|
MM_MIXPANEL_TOKEN: "$System.env.MM_MIXPANEL_TOKEN" |
|
|
|
|
] |
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8 |
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
defaultConfig { |
|
|
|
|
applicationId "io.metamask" |
|
|
|
|
minSdkVersion rootProject.ext.minSdkVersion |
|
|
|
|
targetSdkVersion rootProject.ext.targetSdkVersion |
|
|
|
|
versionCode 26 |
|
|
|
|
versionName "0.2.13" |
|
|
|
|
multiDexEnabled true |
|
|
|
|
testBuildType System.getProperty('testBuildType', 'debug') |
|
|
|
|
missingDimensionStrategy "minReactNative", "minReactNative46" |
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
|
|
|
|
ndk { |
|
|
|
|
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" |
|
|
|
|
} |
|
|
|
|
dexOptions { |
|
|
|
|
javaMaxHeapSize "2048M" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
manifestPlaceholders = [ |
|
|
|
|
MM_BRANCH_KEY_TEST: "$System.env.MM_BRANCH_KEY_TEST", |
|
|
|
|
MM_BRANCH_KEY_LIVE: "$System.env.MM_BRANCH_KEY_LIVE", |
|
|
|
|
MM_MIXPANEL_TOKEN: "$System.env.MM_MIXPANEL_TOKEN" |
|
|
|
|
] |
|
|
|
|
missingDimensionStrategy 'react-native-camera', 'general' |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
signingConfigs { |
|
|
|
|
def pass = getPassword("mm","mm-upload-key") |
|
|
|
|
release { |
|
|
|
|
storeFile file('../keystores/release.keystore') |
|
|
|
|
storePassword pass |
|
|
|
|
keyAlias 'key0' |
|
|
|
|
keyPassword pass |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
splits { |
|
|
|
|
abi { |
|
|
|
|
reset() |
|
|
|
|
enable enableSeparateBuildPerCPUArchitecture |
|
|
|
|
universalApk false // If true, also generate a universal APK |
|
|
|
|
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
buildTypes { |
|
|
|
|
debug { |
|
|
|
|
manifestPlaceholders = [isDebug:true] |
|
|
|
|
} |
|
|
|
|
release { |
|
|
|
|
manifestPlaceholders = [isDebug:false] |
|
|
|
|
minifyEnabled enableProguardInReleaseBuilds |
|
|
|
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" |
|
|
|
|
signingConfig signingConfigs.release |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
release { |
|
|
|
|
storeFile file('../keystores/release.keystore') |
|
|
|
|
storePassword pass |
|
|
|
|
keyAlias 'key0' |
|
|
|
|
keyPassword pass |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
splits { |
|
|
|
|
abi { |
|
|
|
|
reset() |
|
|
|
|
enable enableSeparateBuildPerCPUArchitecture |
|
|
|
|
universalApk false // If true, also generate a universal APK |
|
|
|
|
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
buildTypes { |
|
|
|
|
debug { |
|
|
|
|
manifestPlaceholders = [isDebug:true] |
|
|
|
|
} |
|
|
|
|
release { |
|
|
|
|
manifestPlaceholders = [isDebug:false] |
|
|
|
|
minifyEnabled enableProguardInReleaseBuilds |
|
|
|
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" |
|
|
|
|
signingConfig signingConfigs.release |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
buildTypes.each { |
|
|
|
|
it.buildConfigField 'String', 'foxCode', "\"$System.env.MM_FOX_CODE\"" |
|
|
|
|
it.buildConfigField 'String', 'foxCode', "\"$System.env.MM_FOX_CODE\"" |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
packagingOptions { |
|
|
|
|
// Make sure libjsc.so does not packed in APK |
|
|
|
|
exclude "**/libjsc.so" |
|
|
|
|
} |
|
|
|
|
// applicationVariants are e.g. debug, release |
|
|
|
|
applicationVariants.all { variant -> |
|
|
|
|
variant.outputs.each { output -> |
|
|
|
|
// For each separate APK per architecture, set a unique version code as described here: |
|
|
|
|
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits |
|
|
|
|
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4] |
|
|
|
|
def abi = output.getFilter(OutputFile.ABI) |
|
|
|
|
if (abi != null) { // null for the universal-debug, universal-release variants |
|
|
|
|
output.versionCodeOverride = |
|
|
|
|
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// applicationVariants are e.g. debug, release |
|
|
|
|
applicationVariants.all { variant -> |
|
|
|
|
variant.outputs.each { output -> |
|
|
|
|
// For each separate APK per architecture, set a unique version code as described here: |
|
|
|
|
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits |
|
|
|
|
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4] |
|
|
|
|
def abi = output.getFilter(OutputFile.ABI) |
|
|
|
|
if (abi != null) { // null for the universal-debug, universal-release variants |
|
|
|
|
output.versionCodeOverride = |
|
|
|
|
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dependencies { |
|
|
|
|
implementation project(':react-native-sensors') |
|
|
|
|
implementation project(':react-native-reanimated') |
|
|
|
|
implementation project(':react-native-webview') |
|
|
|
|
implementation project(':react-native-fabric') |
|
|
|
|
implementation project(':@react-native-community_netinfo') |
|
|
|
|
implementation project(':react-native-view-shot') |
|
|
|
|
implementation project(':lottie-react-native') |
|
|
|
|
implementation project(':@react-native-community_async-storage') |
|
|
|
|
implementation project(':react-native-push-notification') |
|
|
|
|
implementation project(':react-native-background-timer') |
|
|
|
|
implementation project(':react-native-device-info') |
|
|
|
|
implementation project(':react-native-svg') |
|
|
|
|
implementation project(':react-native-gesture-handler') |
|
|
|
|
implementation project(':react-native-screens') |
|
|
|
|
implementation 'androidx.multidex:multidex:2.0.0' |
|
|
|
|
implementation 'androidx.annotation:annotation:1.1.0' |
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.0.0' |
|
|
|
|
implementation "com.facebook.react:react-native:+" // From node_modules |
|
|
|
|
implementation 'org.chromium:v8-android:7.8.+' |
|
|
|
|
|
|
|
|
|
implementation project(':react-native-branch') |
|
|
|
|
implementation project(':react-native-sensors') |
|
|
|
|
implementation project(':react-native-reanimated') |
|
|
|
|
implementation project(':react-native-webview') |
|
|
|
|
implementation project(':react-native-fabric') |
|
|
|
|
implementation project(':@react-native-community_netinfo') |
|
|
|
|
implementation project(':react-native-view-shot') |
|
|
|
|
implementation project(':lottie-react-native') |
|
|
|
|
implementation project(':@react-native-community_async-storage') |
|
|
|
|
implementation project(':react-native-push-notification') |
|
|
|
|
implementation project(':react-native-background-timer') |
|
|
|
|
implementation project(':react-native-device-info') |
|
|
|
|
implementation project(':react-native-svg') |
|
|
|
|
implementation project(':react-native-gesture-handler') |
|
|
|
|
implementation project(':react-native-screens') |
|
|
|
|
implementation 'androidx.multidex:multidex:2.0.0' |
|
|
|
|
implementation 'androidx.annotation:annotation:1.1.0' |
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.0.0' |
|
|
|
|
implementation "com.facebook.react:react-native:+" // From node_modules |
|
|
|
|
implementation 'org.chromium:v8-android:7.8.+' |
|
|
|
|
|
|
|
|
|
implementation project(':react-native-branch') |
|
|
|
|
implementation "io.branch.sdk.android:library:4.1.2" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
implementation project(':react-native-camera') |
|
|
|
|
implementation project(':react-native-share') |
|
|
|
|
implementation project(':react-native-i18n') |
|
|
|
|
implementation project(':react-native-aes-crypto') |
|
|
|
|
implementation project(':react-native-keychain') |
|
|
|
|
implementation project(':react-native-os') |
|
|
|
|
implementation project(':react-native-randombytes') |
|
|
|
|
implementation project(':react-native-fs') |
|
|
|
|
implementation project(':react-native-vector-icons') |
|
|
|
|
implementation project(':react-native-camera') |
|
|
|
|
implementation project(':react-native-share') |
|
|
|
|
implementation project(':react-native-i18n') |
|
|
|
|
implementation project(':react-native-aes-crypto') |
|
|
|
|
implementation project(':react-native-keychain') |
|
|
|
|
implementation project(':react-native-os') |
|
|
|
|
implementation project(':react-native-randombytes') |
|
|
|
|
implementation project(':react-native-fs') |
|
|
|
|
implementation project(':react-native-vector-icons') |
|
|
|
|
implementation 'com.mixpanel.android:mixpanel-android:5.+' |
|
|
|
|
|
|
|
|
|
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') { |
|
|
|
|
transitive = true; |
|
|
|
|
} |
|
|
|
|
androidTestImplementation('com.wix:detox:+') { transitive = true } |
|
|
|
|
androidTestImplementation 'junit:junit:4.12' |
|
|
|
|
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') { |
|
|
|
|
transitive = true; |
|
|
|
|
} |
|
|
|
|
androidTestImplementation('com.wix:detox:+') { transitive = true } |
|
|
|
|
androidTestImplementation 'junit:junit:4.12' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Run this once to be able to run the application with BUCK |
|
|
|
|
// puts all compile dependencies into folder libs for BUCK to use |
|
|
|
|
task copyDownloadableDepsToLibs(type: Copy) { |
|
|
|
|
from configurations.compile |
|
|
|
|
into 'libs' |
|
|
|
|
from configurations.compile |
|
|
|
|
into 'libs' |
|
|
|
|
} |
|
|
|
|