Skip to content

Commit 64b6540

Browse files
Add gitpod config
this commit adds support for Gitpod.io, a free automated dev environment that makes contributing and generally working on GitHub projects much easier. It allows anyone to start a ready-to-code dev environment for any branch, issue and pull request with a single click.
1 parent 0c7b64f commit 64b6540

File tree

2 files changed

+54
-13
lines changed

2 files changed

+54
-13
lines changed

.gitpod.Dockerfile

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
1-
FROM gitpod/workspace-full
2-
1+
FROM gitpod/workspace-full:latest
2+
3+
ENV ANDROID_HOME=/home/gitpod/android-sdk \
4+
FLUTTER_HOME=/home/gitpod/flutter
5+
6+
USER root
7+
8+
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
9+
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
10+
apt-get update && \
11+
apt-get -y install build-essential dart libkrb5-dev gcc make gradle android-tools-adb android-tools-fastboot openjdk-8-jdk && \
12+
apt-get clean && \
13+
apt-get -y autoremove && \
14+
apt-get -y clean && \
15+
rm -rf /var/lib/apt/lists/*;
16+
317
USER gitpod
418

5-
# Install custom tools, runtime, etc. using apt-get
6-
# For example, the command below would install "bastet" - a command line tetris clone:
7-
#
8-
# RUN sudo apt-get -q update && # sudo apt-get install -yq bastet && # sudo rm -rf /var/lib/apt/lists/*
9-
#
10-
# More information: https://www.gitpod.io/docs/config-docker/
19+
RUN cd /home/gitpod && \
20+
wget -qO flutter_sdk.tar.xz \
21+
https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.9.1+hotfix.4-stable.tar.xz &&\
22+
tar -xvf flutter_sdk.tar.xz && \
23+
rm -f flutter_sdk.tar.xz
24+
25+
RUN cd /home/gitpod && \
26+
wget -qO android_studio.zip \
27+
https://dl.google.com/dl/android/studio/ide-zips/3.3.0.20/android-studio-ide-182.5199772-linux.zip && \
28+
unzip android_studio.zip && \
29+
rm -f android_studio.zip
30+
31+
# TODO(tianhaoz95): make the name of the SDK file into an environment variable to avoid maintainance issue
32+
RUN mkdir -p /home/gitpod/android-sdk && \
33+
cd /home/gitpod/android-sdk && \
34+
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \
35+
unzip sdk-tools-linux-4333796.zip && \
36+
rm -f sdk-tools-linux-4333796.zip

.gitpod.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
1-
tasks:
2-
- init: echo "Replace me with a build script for the project."
3-
command: echo "Replace me with something that should run on every start, or just
4-
remove me entirely."
51
image:
6-
file: .gitpod.Dockerfile
2+
file: .gitpod.dockerfile
3+
github:
4+
prebuilds:
5+
master: true
6+
branches: false
7+
pullRequests: true
8+
pullRequestsFromForks: false
9+
addCheck: false
10+
addComment: true
11+
addBadge: false
12+
addLabel: false
13+
tasks:
14+
- command: |
15+
mkdir -p /home/gitpod/.android
16+
touch /home/gitpod/.android/repositories.cfg
17+
export PATH=/usr/lib/dart/bin:$FLUTTER_HOME/bin:$ANDROID_HOME/bin:$PATH
18+
/home/gitpod/android-sdk/tools/bin/sdkmanager "platform-tools" "platforms;android-28" "build-tools;28.0.3"
19+
vscode:
20+
extensions:
21+
- [email protected]:/kOacEWdiDRLyN/idUiM4A==

0 commit comments

Comments
 (0)