Skip to content

Commit 995f440

Browse files
committed
可以在 docker 上跑起来了
1 parent cd0871d commit 995f440

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ app/src/main/java/net/coding/program/network/model/baidumap/
4646
/.gradle/
4747
/gradle
4848

49+
!/coding.jks
50+
!/local.properties
51+
/gradle.properties
52+
/coding.jks

app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ android {
6161
versionName "5.4"
6262
targetSdkVersion 23
6363

64-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
64+
manifestPlaceholders = [
65+
XG_ACCESS_ID : "0",
66+
XG_ACCESS_KEY: "0",
67+
]
6568
signingConfig signingConfigs.config
6669
}
6770
enterprise {

ci/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM javiersantos/android-ci:27.0.3
2+
LABEL maintainer="Coding Android"
3+
4+
RUN curl -L https://services.gradle.org/distributions/gradle-4.4-bin.zip > /gradle.zip && \
5+
mkdir /opt/gradle && \
6+
unzip /gradle.zip -d /opt/gradle && \
7+
export PATH=$PATH:/opt/gradle/gradle-4.4/bin && \
8+
rm -rf /gradle.zip
9+
10+
11+

ci/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cur_dir=$(cd $(dirname $0); pwd)
2+
code_dir=$(cd $(dirname $0); cd ..; pwd)
3+
docker_src=/home/data
4+
5+
docker rm ci2
6+
docker run --mount type=bind,source=$code_dir,target=$docker_src -it --name ci2 android-ci:v2 \
7+
bash -c "cd ${docker_src} && export PATH=$PATH:/opt/gradle/gradle-4.4/bin && gradle wrapper && ./gradlew assembleRelease"
8+

0 commit comments

Comments
 (0)