Skip to content

Commit 5455c06

Browse files
authored
Add Circle CI (#3)
* Add initial CI * Add permissions * Add debug build * Remove downloadDependencies * remove lint * remove alpha container * ensure sdk accepted * google() -> maven * dependencies * remove proxy * Build debug and release. Store apks
1 parent e32052a commit 5455c06

File tree

4 files changed

+49
-4
lines changed

4 files changed

+49
-4
lines changed

.circleci/config.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/microbit-android
5+
docker:
6+
- image: circleci/android:api-28
7+
environment:
8+
JVM_OPTS: -Xmx3200m
9+
steps:
10+
- checkout
11+
- restore_cache:
12+
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
13+
- run:
14+
name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
15+
command: sudo chmod +x ./gradlew
16+
- run:
17+
name: Approve SDK Licenses
18+
# Captures SIGPIPE 141 error but still allow repeating "y" to accept all licenses
19+
command: yes | sdkmanager --licenses || if [ $? -ne '141' ]; then exit $?; fi;
20+
- run:
21+
name: Download Dependencies
22+
command: ./gradlew androidDependencies
23+
- save_cache:
24+
paths:
25+
- ~/.gradle
26+
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
27+
- run:
28+
name: Run Debug Build
29+
command: ./gradlew assembleDebug
30+
- run:
31+
name: Run Release Build
32+
command: ./gradlew assembleRelease
33+
- store_artifacts: # store apks; should we push these to GH?
34+
path: app/build/outputs/apk/
35+
destination: apks/
36+
- store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
37+
path: app/build/reports
38+
destination: reports
39+
- store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
40+
path: app/build/test-results
41+
# See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples
42+
43+
workflows:
44+
version: 2
45+
build:
46+
jobs:
47+
- build

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
33
repositories {
4-
google()
5-
jcenter()
4+
maven { url 'https://maven.google.com' }
5+
jcenter()
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:3.4.1'

gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@
1313
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1414
# org.gradle.parallel=true
1515
#Wed Aug 05 08:59:58 BST 2015
16-
systemProp.http.proxyHost=106.1.18.35
17-
systemProp.http.proxyPort=8080

gradlew

100644100755
File mode changed.

0 commit comments

Comments
 (0)