minor updates to build the app bundle

This commit is contained in:
Jason Wall 2021-01-01 21:50:52 +00:00
parent 61297c95e1
commit 18fb8c7ad3
10 changed files with 189 additions and 9 deletions

View File

@ -1,6 +1,6 @@
stages: stages:
- test
- build - build
- test
- staging - staging
- prod - prod
@ -15,7 +15,6 @@ build-site:
artifacts: artifacts:
paths: paths:
- ./src/dist/dynamicbible - ./src/dist/dynamicbible
needs: ["test"]
build-android: build-android:
stage: build stage: build
@ -27,15 +26,17 @@ build-android:
- bash ./install-sdk.sh - bash ./install-sdk.sh
- cd .. - cd ..
script: script:
- pwd
- npm ci - npm ci
- npm run-script build - npm run-script build
- npm run-script copy - npm run-script copy
- cd android - cd android
- gradle signingReport
- gradle assembleRelease - gradle assembleRelease
- gradle bundleRelease
artifacts: artifacts:
paths: paths:
- ./src/android/app/build/outputs - ./src/android/app/build/outputs
needs: ["test"]
test: test:
stage: test stage: test
@ -45,6 +46,7 @@ test:
script: script:
- cd ./src - cd ./src
- make test - make test
needs: ["build-site"]
deploy-staging: deploy-staging:
stage: staging stage: staging

View File

@ -13,6 +13,7 @@ build-android:
npm run-script copy npm run-script copy
cd android/ cd android/
./gradlew assembleRelease ./gradlew assembleRelease
./gradlew bundleRelease
build: build-site build-android build: build-site build-android

View File

@ -27,6 +27,8 @@ build/
# Local configuration file (sdk path, etc) # Local configuration file (sdk path, etc)
local.properties local.properties
signing.properties
walljm-play-store-key.jks
# Proguard folder generated by Eclipse # Proguard folder generated by Eclipse
proguard/ proguard/

116
src/android/.idea/codeStyles/Project.xml generated Normal file
View File

@ -0,0 +1,116 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</component>

30
src/android/.idea/jarRepositories.xml generated Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
</component>
</project>

4
src/android/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK" />
</project>

View File

@ -1,5 +1,11 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
// Create a variable called keystorePropertiesFile, and initialize it to your
// keystore.properties file, in the rootProject folder.
def keystorePropertiesFile = rootProject.file("signing.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig { defaultConfig {
@ -10,10 +16,19 @@ android {
versionName "1.0" versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['password'].replaceAll('JASON', "\\\$")
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['password'].replaceAll('JASON', "\\\$")
}
}
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
} }
} }
} }

View File

@ -7,7 +7,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.6.1' classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong

View File

@ -8,7 +8,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.6.1' classpath 'com.android.tools.build:gradle:4.0.0'
} }
} }

View File

@ -26,3 +26,13 @@ touch /root/.android/repositories.cfg
# Install Build Essentials # Install Build Essentials
echo sdk.dir=$ANDROID_HOME > ../local.properties echo sdk.dir=$ANDROID_HOME > ../local.properties
# Insall the signing keys
cd ..
echo "Creating store key file and signing properties"
base64 -d $play_store_key > ./walljm-play-store-key.jks
cp $play_store_signing_properties ./signing.properties
# diagnostics, show me what you've got and where you're at
ls -laF
pwd