Skip to content

Commit ab69b3f

Browse files
Use deterministic gradle version in docker, not checked in (#233)
* Put gradle in docker * Work with Android Studio * Remove old script
1 parent 1f34cfd commit ab69b3f

File tree

11 files changed

+29
-354
lines changed

11 files changed

+29
-354
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ captures/
178178
# Gradle:
179179
.idea/**/gradle.xml
180180
.idea/**/libraries
181+
gradle*
181182

182183

183184
## CUSTOM

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ clean-local-properties:
1515
rm -f local.properties
1616

1717
sdk: clean-local-properties
18-
./gradlew clean assembleDebug testDebugUnitTest --info
18+
gradle clean assembleDebug testDebugUnitTest --info
1919

2020
sdk-in-container:
2121
${DOCKER_RUN} make sdk

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Please refer to: https://www.leanplum.com/docs/android/setup
2020
## Build the SDK
2121
To build the sdk run:
2222
```bash
23-
./build.sh
23+
make sdk-in-container
2424
```
2525
## Contributing
2626
Please follow the Conventional Changelog Commit Style and send a pull request to `develop` branch.

Tools/jenkins/build.dockerfile

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
11
FROM jangrewe/gitlab-ci-android
22

3-
ARG emulator_platform=android-26
4-
ARG system_image="system-images;${emulator_platform};google_apis;x86"
5-
ARG platform_image="platforms;${emulator_platform}"
6-
3+
################################ Tools Installation ################################
74
RUN apt-get update && \
85
apt-get install -y --no-install-recommends \
96
nodejs=6.11.4~dfsg-1ubuntu1 \
107
build-essential \
118
&& rm -rf /var/lib/apt/lists/*
129

10+
################################ Gradle Installation ################################
11+
# Allow the host to use gradle cache, otherwise gradle will always download plugins & artifacts.
12+
VOLUME ["/root/.gradle/caches/"]
13+
14+
ARG GRADLE_VERSION=4.10
15+
ARG GRADLE_ZIP=gradle-${GRADLE_VERSION}-bin.zip
16+
RUN cd /usr/local && \
17+
curl -L https://services.gradle.org/distributions/${GRADLE_ZIP} -o ${GRADLE_ZIP} && \
18+
unzip ${GRADLE_ZIP} && \
19+
rm ${GRADLE_ZIP}
20+
21+
# Export gradle environment variables.
22+
ENV GRADLE_HOME=/usr/local/gradle-${GRADLE_VERSION}
23+
ENV PATH=$PATH:$GRADLE_HOME/bin
24+
25+
########################### Android Emulator Installation ###########################
26+
ARG emulator_platform=android-26
27+
ARG system_image="system-images;${emulator_platform};google_apis;x86"
28+
ARG platform_image="platforms;${emulator_platform}"
29+
1330
ENV PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools/bin"
1431

1532
RUN sdkmanager emulator tools platform-tools ${platform_image} ${system_image} --verbose && \
1633
echo no | avdmanager create avd -n "device1" --package ${system_image} --tag google_apis
34+
35+
################################
36+
CMD ["bash"]

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
}
88
dependencies {
99
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.4.12'
10-
classpath 'com.android.tools.build:gradle:3.0.0'
10+
classpath 'com.android.tools.build:gradle:3.1.4'
1111
}
1212
}
1313

build.sh

Lines changed: 0 additions & 84 deletions
This file was deleted.

common-methods.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Export methods by turning them into closures
22
ext {
33
COMPILE_SDK_VERSION = 27
4-
BUILD_TOOLS_VERSION = '27.0.2'
4+
BUILD_TOOLS_VERSION = '27.0.3'
55
SUPPORT_LIBRARY_VERSION = '27.0.2'
66

77
LEANPLUM_GROUP_ID = 'com.leanplum'

gradle/wrapper/gradle-wrapper.jar

-53.4 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

gradlew

Lines changed: 0 additions & 172 deletions
This file was deleted.

0 commit comments

Comments
 (0)