build: migrate from cordova to capacitor

Closes #85
This commit is contained in:
Jovan Krunić
2021-11-06 21:13:52 +01:00
parent 523e34f6e4
commit 7f23a0e6cf
44 changed files with 2010 additions and 576 deletions

View File

@@ -10,7 +10,6 @@ ENV ANDROID_APIS="android-30" \
ANDROID_BUILD_TOOLS_VERSION="30.0.2" \
NPM_VERSION="^6.0.0" \
IONIC_VERSION="^6.0.0" \
CORDOVA_VERSION="^10.0.0" \
CORDOVA_RES_VERSION="latest" \
### Configure download URLs
ANDROID_SDK_TOOLS_DOWNLOAD_URL="https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip" \
@@ -31,10 +30,6 @@ RUN rm /bin/sh && ln -s /bin/bash /bin/sh && \
### Set debconf to run non-interactively
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
### Install JAVA 8
RUN apt-get update && \
apt-get install --no-install-recommends -y openjdk-8-jdk
### Install locales and base dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
@@ -55,6 +50,10 @@ RUN apt-get update && \
gpg-agent \
jq
### Install Java Development Kit 11
RUN add-apt-repository -y ppa:openjdk-r/ppa && apt-get update && \
apt-get install --no-install-recommends -y openjdk-11-jdk
### Setup the locale
RUN sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen en_US.UTF-8
@@ -104,14 +103,6 @@ RUN bash /tmp/$NODE_SETUP_SCRIPT && apt-get install -y nodejs && \
### Install wanted npm version
npm install -g --unsafe-perm npm@$NPM_VERSION && \
### Install needed global npm packages
npm install -g --unsafe-perm @ionic/cli@$IONIC_VERSION cordova@$CORDOVA_VERSION cordova-res@$CORDOVA_RES_VERSION
### Create, build, delete an empty cordova project to download necessary maven files and keep them in image
RUN cd / && cordova create tmp-project && \
cd tmp-project && \
cordova platform add android && \
cordova build && \
cd .. && \
rm -rf tmp-project
npm install -g --unsafe-perm @ionic/cli@$IONIC_VERSION cordova-res@$CORDOVA_RES_VERSION
CMD [""]