From 1d94dd5bf3471a5756319994a786f872fe207235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jovan=20Kruni=C4=87?= Date: Mon, 19 Apr 2021 22:10:11 +0200 Subject: [PATCH] build: add simple script for building for android Closes #100 --- README.md | 6 ++++++ package.json | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fbf8d9de..316c1024 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,12 @@ Build the app (transpile etc.): npm run build ``` +Build the app for testing on an android device: + +``` +npm run docker:build:android +``` + Open the app in the browser: ``` ionic serve diff --git a/package.json b/package.json index 711fff9d..10e273c7 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "check-configuration": "openstapps-configuration", "e2e": "LANGUAGE=de-DE ng e2e --no-webdriver-update", "docker:build": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm install && npm run build\"", + "docker:build:android": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"rm -rf platforms/android plugins && ionic cordova platform add android && ionic cordova build android\"", "docker:enter": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash", "docker:fresh": "sudo docker pull registry.gitlab.com/openstapps/app", "docker:serve": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm start\"", @@ -121,7 +122,8 @@ "cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-keyboard": {}, "cordova-plugin-geolocation": { - "GEOLOCATION_USAGE_DESCRIPTION": "The app will use your location to provide features for navigation or distances information." + "GEOLOCATION_USAGE_DESCRIPTION": "The app will use your location to provide features for navigation or distances information.", + "GPS_REQUIRED": "true" } }, "platforms": [