@@ -81,7 +81,7 @@ apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
8181 * Upload all the APKs to the Play Store and people will download
8282 * the correct one based on the CPU architecture of their device.
8383 */
84- def enableSeparateBuildPerCPUArchitecture = false
84+ def enableSeparateBuildPerCPUArchitecture = true
8585
8686/**
8787 * Run Proguard to shrink the Java bytecode in release builds.
@@ -95,8 +95,8 @@ android {
9595 defaultConfig {
9696 applicationId " com.allaboutolaf"
9797 minSdkVersion 16
98- targetSdkVersion 25
99- versionCode 1
98+ targetSdkVersion 23
99+ versionCode 5
100100 versionName " 2.2.3"
101101 ndk {
102102 abiFilters " armeabi-v7a" , " x86"
@@ -108,6 +108,10 @@ android {
108108 gmaps_key : System . getenv(" GMAPS_KEY" ) ?: " " ,
109109 ]
110110 }
111+ signingConfigs {
112+ // the signingConfig is configured below
113+ release
114+ }
111115 splits {
112116 abi {
113117 reset()
@@ -120,6 +124,7 @@ android {
120124 release {
121125 minifyEnabled enableProguardInReleaseBuilds
122126 proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
127+ signingConfig signingConfigs. release
123128 }
124129 }
125130 // applicationVariants are e.g. debug, release
@@ -143,6 +148,40 @@ android {
143148 }
144149}
145150
151+ // borrowed from https://gist.github.com/gabrielemariotti/6856974
152+ def propFile = new File (' android/app//signing.properties' )
153+ if (propFile. canRead()) {
154+ def Properties props = new Properties ()
155+ props. load(new FileInputStream (propFile))
156+ if (props != null
157+ && props. containsKey(' STORE_FILE' )
158+ && props. containsKey(' STORE_PASSWORD' )
159+ && props. containsKey(' KEY_ALIAS' )
160+ && props. containsKey(' KEY_PASSWORD' )
161+ ) {
162+ logger. info ' android/app/signing.properties is fully functional.'
163+ android. signingConfigs. release. storeFile = file(props[' STORE_FILE' ])
164+ android. signingConfigs. release. storePassword = props[' STORE_PASSWORD' ]
165+ android. signingConfigs. release. keyAlias = props[' KEY_ALIAS' ]
166+ android. signingConfigs. release. keyPassword = props[' KEY_PASSWORD' ]
167+ } else {
168+ println ' android/app/signing.properties found, but some entries are missing.'
169+ if (props == null ) {
170+ logger. warn ' `props` was null'
171+ } else {
172+ logger. warn " has STORE_FILE: ${ props.containsKey('STORE_FILE')} "
173+ logger. warn " has STORE_PASSWORD: ${ props.containsKey('STORE_PASSWORD')} "
174+ logger. warn " has KEY_ALIAS: ${ props.containsKey('KEY_ALIAS')} "
175+ logger. warn " has KEY_PASSWORD: ${ props.containsKey('KEY_PASSWORD')} "
176+ }
177+ android. buildTypes. release. signingConfig = null
178+ }
179+ } else {
180+ logger. warn ' android/app/signing.properties not found.'
181+ logger. warn " cwd: ${ new File(".").absolutePath} "
182+ android. buildTypes. release. signingConfig = null
183+ }
184+
146185dependencies {
147186 // please keep this list sorted
148187 compile project(' :bugsnag-react-native' )
0 commit comments