Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions samples/react-native/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,39 @@ android {
keyPassword 'android'
}
}

if (System.getenv('SENTRY_SAMPLE_ENABLE_ABI_SPLIT') == 'true') {
splits {
abi {
enable true
reset()
include 'x86', 'arm64-v8a'
universalApk true
}
}
project.ext.versionCodes = ['armeabi': 1, 'armeabi-v7a': 2, 'arm64-v8a': 3, 'mips': 5, 'mips64': 6, 'x86': 8, 'x86_64': 9]
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
output.versionCodeOverride =
project.ext.versionCodes.get(output.getFilter(
com.android.build.OutputFile.ABI), 0) * 10000000 + android.defaultConfig.versionCode
}
}
}

if (System.getenv('SENTRY_SAMPLE_ENABLE_FLAVORS') == 'true') {
flavorDimensions "version"
productFlavors {
regular {
dimension "version"
}
demo {
dimension "version"
applicationIdSuffix "demo"
}
}
}

buildTypes {
debug {
signingConfig signingConfigs.debug
Expand Down
3 changes: 2 additions & 1 deletion samples/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"clean-watchman": "watchman watch-del-all",
"set-build-number": "npx react-native-version --skip-tag --never-amend --set-build",
"set-version": "npm version --no-git-tag-version",
"postversion": "npx react-native-version --skip-tag --never-amend"
"postversion": "npx react-native-version --skip-tag --never-amend",
"build-android-release-splits-flavors": "export SENTRY_SAMPLE_ENABLE_ABI_SPLIT=true; export SENTRY_SAMPLE_ENABLE_FLAVORS=true; cd android; ./gradlew assembleRelease; cd .."
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.5.12",
Expand Down