From 1227bb083ecdc3558314e568348b8a50ab33d6d8 Mon Sep 17 00:00:00 2001 From: koba <50431175+kobayashi-masaya@users.noreply.github.com> Date: Mon, 7 Sep 2020 13:41:48 +0900 Subject: [PATCH 1/6] Add .circleci/config.yml --- .circleci/config.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..d83c601 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,13 @@ +version: 2.1 + +orbs: + android: circleci/android@0.2.1 + +jobs: + build: + executor: android/android + + steps: + - checkout + - run: + command: ./gradlew build From 92a02bfc3f15da83a872a9f884734c782f45425a Mon Sep 17 00:00:00 2001 From: kobayashi-masaya Date: Mon, 7 Sep 2020 13:52:54 +0900 Subject: [PATCH 2/6] add circleci settings --- .circleci/config.yml | 50 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d83c601..0e749cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,47 @@ -version: 2.1 - -orbs: - android: circleci/android@0.2.1 - +version: 2 jobs: build: - executor: android/android - + working_directory: ~/code + docker: + - image: circleci/android:api-28-alpha + environment: + JVM_OPTS: -Xmx3200m steps: - checkout - run: - command: ./gradlew build + name: Download dependencies + command: ./gradlew androidDependencies + - run: + name: Run Tests + command: ./gradlew lint test + - run: + name: Build debug apk and release apk + command: | + ./gradlew :app:assembleDebug + ./gradlew :app:assembleDebugAndroidTest + - store_artifacts: + path: app/build/reports + destination: reports + - store_test_results: + path: app/build/test-results + device_farm: + docker: + - image: circleci/android:api-28-alpha + steps: + - checkout + - run: + name: AWS DeviceFarm + command: ./gradlew :app:devicefarmUpload +workflows: + version: 2 + build_and_test: + jobs: + - build + - device_farm: + requires: + - build + filters: + branches: + only: + - master + - circleci-project-setup From 29a64cb2a3b405b261dc62f31fac04ab38d85a53 Mon Sep 17 00:00:00 2001 From: kobayashi-masaya Date: Mon, 7 Sep 2020 14:05:54 +0900 Subject: [PATCH 3/6] fix build.gradle --- app/build.gradle | 20 +++++++++++++++++--- build.gradle | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ee1ce7e..25452e4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,26 @@ apply plugin: 'com.android.application' +apply plugin: 'devicefarm' + +def envAccessKey = ENV_ACCESS_KEY +def envSecretKey = ENV_SECRET_KEY + +devicefarm { + projectName "sci01445_android" + authentication { + accessKey envAccessKey + secretKey envSecretKey + } + // Fuzz + fuzz { } +} android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "ncmbdataquick.mbaas.com.nifcloud.datastorequickstart" minSdkVersion 15 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -21,7 +35,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) testImplementation 'junit:junit:4.12' - implementation 'com.android.support:appcompat-v7:27.0.1' + implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:design:27.0.1' implementation 'com.google.code.gson:gson:2.3.1' implementation files('libs/NCMB.jar') diff --git a/build.gradle b/build.gradle index a960ab3..4a50285 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.amazonaws:aws-devicefarm-gradle-plugin:1.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } From 8356fca7d587c1ec07e5517565758a30331420e2 Mon Sep 17 00:00:00 2001 From: kobayashi-masaya Date: Mon, 7 Sep 2020 14:12:03 +0900 Subject: [PATCH 4/6] delete ApplicationTest.java --- .../datastorequickstart/ApplicationTest.java | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 app/src/androidTest/java/ncmbdataquick/mbaas/com/nifcloud/datastorequickstart/ApplicationTest.java diff --git a/app/src/androidTest/java/ncmbdataquick/mbaas/com/nifcloud/datastorequickstart/ApplicationTest.java b/app/src/androidTest/java/ncmbdataquick/mbaas/com/nifcloud/datastorequickstart/ApplicationTest.java deleted file mode 100644 index cf09760..0000000 --- a/app/src/androidTest/java/ncmbdataquick/mbaas/com/nifcloud/datastorequickstart/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package ncmbdataquick.mbaas.com.nifcloud.datastorequickstart; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file From 2b4dc855a1e1b7beac2d43447af4dcae09dc2954 Mon Sep 17 00:00:00 2001 From: kobayashi-masaya Date: Mon, 7 Sep 2020 14:24:33 +0900 Subject: [PATCH 5/6] no chenge --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 4a50285..97416e8 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.amazonaws:aws-devicefarm-gradle-plugin:1.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files From a6ba9e2093f84bc68d4ab2b50017ea620b1af67a Mon Sep 17 00:00:00 2001 From: kobayashi-masaya Date: Mon, 7 Sep 2020 14:28:56 +0900 Subject: [PATCH 6/6] fix build.gradle --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 25452e4..01c7e24 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -36,7 +36,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) testImplementation 'junit:junit:4.12' implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support:design:27.0.1' + implementation 'com.android.support:design:28.0.0' implementation 'com.google.code.gson:gson:2.3.1' implementation files('libs/NCMB.jar') }