New build #125

Merged
akinwale merged 4 commits from new-build into master 2020-02-27 09:05:01 +01:00
5 changed files with 112 additions and 4 deletions
Showing only changes of commit bf3dd503e4 - Show all commits

2
.gitignore vendored
View file

@ -63,4 +63,4 @@ android/app/google-services.json
*.log *.log
.vagrant .vagrant
android/app/build/* android/app/build/*
android/bin

67
android/.gitignore vendored Normal file
View file

@ -0,0 +1,67 @@
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
# CocoaPods
/ios/Pods/
# Other Files
app/google-services.json
*.log
.vagrant
*.hprof
app/build
app/bin

View file

@ -77,18 +77,22 @@ import com.android.build.OutputFile
task buildReactNativeBundle(type:Exec) { task buildReactNativeBundle(type:Exec) {
println("Building React Native bundle") println("Building React Native bundle")
workingDir '../../' workingDir new File(rootProject.projectDir, '../')
commandLine './bundle-android.sh' commandLine './bundle-android.sh'
} }
preBuild.dependsOn buildReactNativeBundle preBuild.dependsOn buildReactNativeBundle
task printVersionName {
doLast {
println android.defaultConfig.versionName
}
}
project.ext.react = [ project.ext.react = [
entryFile: "index.js", entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing enableHermes: false, // clean and rebuild if changing
] ]
apply from: "../../node_modules/react-native/react.gradle"
/** /**
* Set this to true to create two separate APKs instead of one: * Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices * - An APK that only works on ARM devices
@ -142,6 +146,10 @@ android {
versionCode 1302 versionCode 1302
versionName "0.13.2" versionName "0.13.2"
missingDimensionStrategy 'react-native-camera', 'general' missingDimensionStrategy 'react-native-camera', 'general'
multiDexEnabled true
}
dexOptions {
jumboMode true
} }
productFlavors { productFlavors {
__32bit { __32bit {

Binary file not shown.

33
android/release.sh Normal file
View file

@ -0,0 +1,33 @@
#!/bin/bash
./gradlew assembleRelease --console=plain
version=$(./gradlew -q printVersionName --console=plain | tail -1)
mkdir -p bin/
rm bin/*
cp app/build/outputs/apk/__32bit/release/app-__32bit-release.apk bin/browser-$version-release-unsigned__arm.apk
cp app/build/outputs/apk/__64bit/release/app-__64bit-release.apk bin/browser-$version-release-unsigned__arm64.apk
# sign 32-bit
echo "Signing 32-bit APK..."
jarsigner -verbose -sigalg SHA1withRSA \
-digestalg SHA1 \
-keystore lbry-android.keystore \
-storepass $KEYSTORE_PASSWORD \
bin/browser-$version-release-unsigned__arm.apk lbry-android > /dev/null \
&& mv bin/browser-$version-release-unsigned__arm.apk bin/browser-$version-release-signed__arm.apk
zipalign -v 4 \
bin/browser-$version-release-signed__arm.apk bin/browser-$version-release__arm.apk > /dev/null \
&& rm bin/browser-$version-release-signed__arm.apk
echo "32-bit APK successfully built."
# sign 64-bit
echo "Signing 64-bit APK..."
jarsigner -verbose -sigalg SHA1withRSA \
-digestalg SHA1 \
-keystore lbry-android.keystore \
-storepass $KEYSTORE_PASSWORD \
bin/browser-$version-release-unsigned__arm64.apk lbry-android > /dev/null \
&& mv bin/browser-$version-release-unsigned__arm64.apk bin/browser-$version-release-signed__arm64.apk
zipalign -v 4 \
bin/browser-$version-release-signed__arm64.apk bin/browser-$version-release__arm64.apk > /dev/null \
&& rm bin/browser-$version-release-signed__arm64.apk
echo "64-bit APK successfully built."