Skip to content

Commit

Permalink
Merge pull request #66 from paulnagle/library_updates_feb_2023
Browse files Browse the repository at this point in the history
Library updates feb 2023
  • Loading branch information
paulnagle authored Feb 5, 2023
2 parents d318a61 + 8b9c5cb commit fb54913
Show file tree
Hide file tree
Showing 11 changed files with 5,915 additions and 5,461 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-debug-android.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Debug Android

on: [push]

jobs:
build:
name: Build Debug APK
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Build for android
run: ./build.sh -a

- name: Upload dev APK
uses: actions/upload-artifact@v3
with:
name: app-dev
path: platforms/android/app/build/outputs/apk/debug/app-debug.apk

46 changes: 46 additions & 0 deletions .github/workflows/build-release-android.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build Release Android

on:
release:
types: [published]

jobs:
build:
name: Build Release AAB
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 19.x

- name: Build Script for android
run: ./build.sh -r

- uses: r0adkll/sign-android-release@v1
name: Sign Android app AAB
id: sign_app
with:
releaseDirectory: platforms/android/app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.NAIRELAND_KEYSTORE }}
alias: alias_name
keyStorePassword: ${{ secrets.NAIRELAND_KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.NAIRELAND_KEYSTORE_PASSWORD }}
env:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: "30.0.3"

- name: Upload release bundle
uses: actions/upload-artifact@v1
with:
name: app-release
path: platforms/android/app/build/outputs/bundle/release/app-release.aab
39 changes: 20 additions & 19 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,23 @@ usage(){
echo " -i (Build for ios)"
echo " -a (Build for android)"
echo " -c (Clean old build files)"
echo " -r (Release build for android when passed with -a)"
echo " -r (Release build for android, for use with github actions)"
exit 1
}

add_plugins() {
red_text "** Adding cordova plugins"
ionic cordova plugin add cordova-plugin-splashscreen
ionic cordova plugin add cordova-plugin-statusbar
# ionic cordova plugin add cordova-plugin-googlemaps
# ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps
ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps.git#0b8ea76ad34fb2a202a9de1b9d0e051a82ad9443
# ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps.git#918eb5a1bfce9595e922b3ad2442ff81cb9a0fa0
ionic cordova plugin add https://github.com/paulnagle/cordova-plugin-googlemaps.git
ionic cordova plugin add com-badrit-base64
ionic cordova plugin add cordova-plugin-ionic-webview
ionic cordova plugin add cordova-plugin-inappbrowser
ionic cordova plugin add cordova-plugin-advanced-http
ionic cordova plugin add cordova-plugin-insomnia
ionic cordova plugin add cordova-plugin-androidx
ionic cordova plugin add cordova-plugin-androidx-adapter

if [[ "${PLATFORM}" != "android" ]]; then
ionic cordova plugin add cordova-plugin-splashscreen
fi

}

Expand All @@ -44,11 +42,11 @@ setup_node_npm() {
export NVM_DIR=$HOME/.nvm;
source $NVM_DIR/nvm.sh;

NVM_VERSION_REQUIRED="v16.18.1"
NVM_VERSION_REQUIRED="v19.5.0"
NVM_VERSION_CURRENT=$(nvm version)
if [[ "${NVM_VERSION_CURRENT}" != "${NVM_VERSION_REQUIRED}" ]]; then
nvm install v16.18.1
nvm use v16.18.1
nvm install "${NVM_VERSION_REQUIRED}"
nvm use "${NVM_VERSION_REQUIRED}"
else
red_text "node version: ${NVM_VERSION_CURRENT}"
fi
Expand All @@ -66,13 +64,12 @@ setup_ionic() {

install_npm_deps() {
red_text "** Installing other npm dependencies"
npm update --save \
npm install --save \
@ionic-native/google-maps \
@ionic-native/base64 \
@awesome-cordova-plugins/in-app-browser \
@awesome-cordova-plugins/http \
@awesome-cordova-plugins/splash-screen \
@awesome-cordova-plugins/status-bar \
@ionic-native/status-bar \
@awesome-cordova-plugins/insomnia \
@ngx-translate/core \
@ngx-translate/http-loader \
Expand All @@ -81,6 +78,10 @@ install_npm_deps() {
moment \
moment-timezone

if [[ "${PLATFORM}" != "android" ]]; then
npm install --save @awesome-cordova-plugins/splash-screen
fi

red_text "** Running npm audit fix"
npm audit fix
}
Expand All @@ -93,15 +94,13 @@ clean_old_build() {

red_text "!! Removing cordova plugins"
ionic cordova plugin rm cordova-plugin-inappbrowser
ionic cordova plugin rm cordova-plugin-splashscreen
ionic cordova plugin rm cordova-plugin-splashscreen
ionic cordova plugin rm cordova-plugin-statusbar
ionic cordova plugin rm cordova-plugin-googlemaps
ionic cordova plugin rm cordova-plugin-advanced-http
ionic cordova plugin rm com-badrit-base64
ionic cordova plugin rm cordova-plugin-ionic-webview
ionic cordova plugin rm cordova-plugin-insomnia
ionic cordova plugin rm cordova-plugin-androidx
ionic cordova plugin rm cordova-plugin-androidx-adapter

red_text "!! Deleting platform folder"
rm -rf platform
Expand Down Expand Up @@ -134,8 +133,8 @@ build_for() {
echo ">>>> ionic cordova resources ${PLATFORM}"
ionic cordova resources "${PLATFORM}"
fi
red_text ">>>> ionic cordova prepare ${PLATFORM}"
ionic cordova prepare "${PLATFORM}"
# red_text ">>>> ionic cordova prepare ${PLATFORM}"
# ionic cordova prepare "${PLATFORM}"
red_text ">>>> ionic cordova build ${PLATFORM}"
if [[ "${ANDROID_RELEASE}" == "true" ]]; then
ionic cordova build android --release --prod
Expand All @@ -161,7 +160,9 @@ while getopts "abcir" option; do
build_for android
;;
r) # Android release build
red_text "RELEASE BUILD"
ANDROID_RELEASE=true
build_for android
;;
i) # Build for ios
build_for ios
Expand Down
5 changes: 3 additions & 2 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-packageName="ie.nasouth.android.naireland" ios-CFBundleIdentifier="ie.nasouth.apple" version="777760201" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-packageName="ie.nasouth.android.naireland" ios-CFBundleIdentifier="ie.nasouth.apple" version="77776.3.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>NA Ireland</name>
<description>NA Ireland</description>
<author email="[email protected]" href="https://www.na-ireland.org/">NA Ireland</author>
Expand All @@ -20,7 +20,6 @@
<preference name="SplashScreenDelay" value="3000" />
<preference name="android-targetSdkVersion" value="32" />
<preference name="android-compileSdkVersion" value="32" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="AIzaSyDwPqrrBYFrtCIJ0IUL81tiIVwYJqUMKCw" />
<preference name="GOOGLE_MAPS_IOS_API_KEY" value="AIzaSyA7ddO5YUH8xukCrGiabEjZdPmm3HmPG-0" />
<platform name="android">
Expand Down Expand Up @@ -60,6 +59,7 @@
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<preference name="StatusBarOverlaysWebView" value="false" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
Expand Down Expand Up @@ -123,6 +123,7 @@
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysAndWhenInUseUsageDescription">
<string>We use your location to determine your distance from NA meetings.</string>
</edit-config>
<preference name="StatusBarOverlaysWebView" value="true" />
</platform>
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
Expand Down
Loading

0 comments on commit fb54913

Please sign in to comment.