Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Download latest release button #243

Merged
merged 7 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 2 additions & 30 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,10 @@ ionic cap build android # generates Android project

An `android` directory will be generated and you can open it with `Android Studio` and build the project based on this instruction <https://capacitorjs.com/docs/android>

You can also create a development version of native `peri` using the following `Dockerfile`, just create it in the root of the `peri` project:

```dockerfile
FROM node:latest

WORKDIR /home/

RUN apt-get update && \
apt-get install -y android-sdk openjdk-17-jdk && \
wget -q https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2022.2.1.20/android-studio-2022.2.1.20-linux.tar.gz && \
tar -C /usr/local -xzf android-studio-2022.2.1.20-linux.tar.gz && \
rm android-studio-2022.2.1.20-linux.tar.gz && \
wget -q https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip && \
unzip -q commandlinetools-linux-9477386_latest.zip && \
mkdir -p /usr/lib/android-sdk/cmdline-tools/latest && \
mv cmdline-tools/* /usr/lib/android-sdk/cmdline-tools/latest/ && \
rm commandlinetools-linux-9477386_latest.zip && \
yes | /usr/lib/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses && \
npm -g install @ionic/cli@7.1.1

ENV ANDROID_HOME=/usr/lib/android-sdk/
ENV PATH=$PATH:${ANDROID_HOME}tools/:${ANDROID_HOME}platform-tools/

WORKDIR /home/app

ENTRYPOINT [ "bash" ]
```

And run:
You can also create a development version of native `peri` using the `Docker` image. To do this you should run the following command:

```shell
docker build -t peri-android-env:latest .
docker build -f docker/Dockerfile -t peri-android-env:latest .
```

After that, you can start the container with:
Expand Down
30 changes: 30 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM node:latest

WORKDIR /home/

ARG OPENJDK_VERSION=17
# You can find latest `Android Studio` and `Command line tools`
# versions here https://developer.android.com/studio
ARG ANDROID_SDK_VERSION=2024.1.1.11
ARG COMMANDLINE_TOOLS_LINUX_VERSION=11076708_latest
ARG IONIC_CLI_VERSION=7.2.0

RUN apt-get update && \
apt-get install -y android-sdk openjdk-${OPENJDK_VERSION}-jdk && \
wget -q https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${ANDROID_SDK_VERSION}/android-studio-${ANDROID_SDK_VERSION}-linux.tar.gz && \
tar -C /usr/local -xzf android-studio-${ANDROID_SDK_VERSION}-linux.tar.gz && \
rm android-studio-${ANDROID_SDK_VERSION}-linux.tar.gz && \
wget -q https://dl.google.com/android/repository/commandlinetools-linux-${COMMANDLINE_TOOLS_LINUX_VERSION}.zip && \
unzip -q commandlinetools-linux-${COMMANDLINE_TOOLS_LINUX_VERSION}.zip && \
mkdir -p /usr/lib/android-sdk/cmdline-tools/latest && \
mv cmdline-tools/* /usr/lib/android-sdk/cmdline-tools/latest/ && \
rm commandlinetools-linux-${COMMANDLINE_TOOLS_LINUX_VERSION}.zip && \
yes | /usr/lib/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses && \
npm -g install @ionic/cli@${IONIC_CLI_VERSION}

ENV ANDROID_HOME=/usr/lib/android-sdk/
ENV PATH=$PATH:${ANDROID_HOME}tools/:${ANDROID_HOME}platform-tools/

WORKDIR /home/app

ENTRYPOINT [ "bash" ]
Loading
Loading