Skip to content

Commit cf4ca35

Browse files
committed
set relese apk
1 parent 79fb90d commit cf4ca35

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

android/app/build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ android {
214214
abi {
215215
reset()
216216
enable enableSeparateBuildPerCPUArchitecture
217-
universalApk false // If true, also generate a universal APK
217+
universalApk true // If true, also generate a universal APK
218218
include (*reactNativeArchitectures())
219219
}
220220
}
@@ -224,6 +224,15 @@ android {
224224
storePassword 'android'
225225
keyAlias 'androiddebugkey'
226226
keyPassword 'android'
227+
}
228+
229+
release {
230+
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
231+
storeFile file(MYAPP_UPLOAD_STORE_FILE)
232+
storePassword MYAPP_UPLOAD_STORE_PASSWORD
233+
keyAlias MYAPP_UPLOAD_KEY_ALIAS
234+
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
235+
}
227236
}
228237
}
229238
buildTypes {
@@ -236,6 +245,8 @@ android {
236245
signingConfig signingConfigs.debug
237246
minifyEnabled enableProguardInReleaseBuilds
238247
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
248+
249+
signingConfig signingConfigs.release
239250
}
240251
}
241252

android/gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,8 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3838
# to write custom TurboModules/Fabric components OR use libraries that
3939
# are providing them.
4040
newArchEnabled=false
41+
42+
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
43+
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
44+
MYAPP_UPLOAD_STORE_PASSWORD=04121998
45+
MYAPP_UPLOAD_KEY_PASSWORD=04121998

0 commit comments

Comments
 (0)