From 932082f526d1dcffa173ad2f041f3a286d78cb65 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Tue, 22 Jan 2019 21:15:59 +0530 Subject: [PATCH 01/21] Added Circle-ci config --- .circleci/config.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..1479d423 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,56 @@ +version: 2 +jobs: + build: + working_directory: ~/code + docker: + - image: circleci/android:api-28-alpha + environment: + JVM_OPTS: -Xmx3200m + steps: + - checkout + - restore_cache: + key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} + - run: + name: Chmod permissions + command: sudo chmod +x ./gradlew + - run: + name: Download Dependencies + command: ./gradlew androidDependencies + - save_cache: + paths: + - ~/.gradle + key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} + - run: + name: Lists installed targets + command: android list target + environment: + TERM: dumb + - run: + name: Show list of system-images + command: sdkmanager --list --verbose | grep system-images + - run: + name: Setup Emulator + command: sdkmanager "system-images;android-21;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-21;default;armeabi-v7a" + - run: + name: Launch Emulator + command: | + cd ${ANDROID_HOME}/emulator;ls + export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib + emulator -avd test -no-window -noaudio -no-boot-anim -no-window -accel on + background: true + - run: + name: Wait emulator + command: | + circle-android wait-for-boot + adb shell input keyevent 82 + - run: + name: Run Espresso UI Tests + command: ./gradlew :app:connectedDebugAndroidTest + - run: + name: Run UnitTest + command: ./gradlew testDebugUnitTest + - store_artifacts: + path: app/build/reports + destination: reports + - store_test_results: + path: app/build/test-results \ No newline at end of file From f4e26e596e588048b4c064f20a6060c17f2e59bf Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Tue, 22 Jan 2019 21:17:58 +0530 Subject: [PATCH 02/21] Update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dd93c859..0f201791 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # PhotoEditor [![Downloads](https://img.shields.io/badge/Download-0.3.3-blue.svg)](https://bintray.com/burhanrashid52/maven/photoeditor) ![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg) [![JavaDoc](https://img.shields.io/badge/JavaDoc-PhotoEditor-blue.svg)](https://burhanrashid52.github.io/PhotoEditor/) [![Uplabs](https://img.shields.io/badge/Uplabs-PhotoEditor-orange.svg)](https://www.uplabs.com/posts/photoeditor) - [![AndroidArsenal](https://img.shields.io/badge/Android%20Arsenal-PhotoEditor-blue.svg)](https://android-arsenal.com/details/1/6736) - [![AndroidDevDigest](https://img.shields.io/badge/AndroidDev%20Digest-%23185-brightgreen.svg)](https://www.androiddevdigest.com/digest-185) - [![AwesomeAndroid](https://img.shields.io/badge/Awesome%20Android-%2397-red.svg)](https://android.libhunt.com/newsletter/97) +[![AndroidArsenal](https://img.shields.io/badge/Android%20Arsenal-PhotoEditor-blue.svg)](https://android-arsenal.com/details/1/6736) +[![AndroidDevDigest](https://img.shields.io/badge/AndroidDev%20Digest-%23185-brightgreen.svg)](https://www.androiddevdigest.com/digest-185) +[![AwesomeAndroid](https://img.shields.io/badge/Awesome%20Android-%2397-red.svg)](https://android.libhunt.com/newsletter/97) [![AndroidWeekly](https://img.shields.io/badge/Android%20Weekly-%23312-blue.svg)](http://androidweekly.net/issues/issue-312) [![Mindorks](https://img.shields.io/badge/Mindorks%20Newsletter-%234-ff69b4.svg)](https://mindorks.com/newsletter/edition/4) From e20cd9904d69df70c61e7c7f5d2c5a772a1b14ec Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Tue, 22 Jan 2019 21:25:47 +0530 Subject: [PATCH 03/21] Update to 28 sdk --- app/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d7aa24a8..46ddfefb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.burhanrashid52.imageeditor" minSdkVersion 14 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -21,7 +21,7 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support.constraint:constraint-layout:1.1.2' + implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support:design:27.1.1' implementation 'ja.burhanrashid52:photoeditor:0.3.3' //implementation project(':photoeditor') From d0b1a834c18216d8e06caab7a568e4fe9c340739 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Tue, 22 Jan 2019 21:33:42 +0530 Subject: [PATCH 04/21] Accept licenses config --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1479d423..cc7b5563 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,6 +20,9 @@ jobs: paths: - ~/.gradle key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} + - run: + name: Accept licenses + command: yes | sdkmanager --licenses && sdkmanager --update - run: name: Lists installed targets command: android list target From 7bd4b29a21d2087aebb474b1036a814f409c8ef9 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Tue, 22 Jan 2019 21:35:31 +0530 Subject: [PATCH 05/21] Accept licenses config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cc7b5563..732f641c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: paths: - ~/.gradle key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} - - run: + - run: name: Accept licenses command: yes | sdkmanager --licenses && sdkmanager --update - run: From 9fbbbc6a86a6bcd87acc4c13609a87913300c9a9 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Thu, 24 Jan 2019 11:23:54 +0530 Subject: [PATCH 06/21] updated accept licenses config --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 732f641c..5f81f61b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,9 +20,6 @@ jobs: paths: - ~/.gradle key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} - - run: - name: Accept licenses - command: yes | sdkmanager --licenses && sdkmanager --update - run: name: Lists installed targets command: android list target @@ -30,7 +27,7 @@ jobs: TERM: dumb - run: name: Show list of system-images - command: sdkmanager --list --verbose | grep system-images + command: yes | sdkmanager --licenses | sdkmanager --list --verbose | grep system-images - run: name: Setup Emulator command: sdkmanager "system-images;android-21;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-21;default;armeabi-v7a" From 07b6953f4dc239e57df731ce01a1fb1b42679884 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Thu, 24 Jan 2019 12:11:23 +0530 Subject: [PATCH 07/21] Update to 28 version --- photoeditor/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/photoeditor/build.gradle b/photoeditor/build.gradle index b5a18017..082c7346 100644 --- a/photoeditor/build.gradle +++ b/photoeditor/build.gradle @@ -27,12 +27,12 @@ ext { } android { - compileSdkVersion 27 - buildToolsVersion '27.0.3' + compileSdkVersion 28 + buildToolsVersion '28.0.3' defaultConfig { minSdkVersion 14 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" From 0fd8966f31c65c87316c958253efb7c96662fdc6 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sat, 26 Jan 2019 21:51:16 +0530 Subject: [PATCH 08/21] Config changes --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f81f61b..be027e2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,9 @@ jobs: - run: name: Chmod permissions command: sudo chmod +x ./gradlew + - run: + name: Accept licenses + command: yes | sdkmanager --licenses - run: name: Download Dependencies command: ./gradlew androidDependencies @@ -27,7 +30,7 @@ jobs: TERM: dumb - run: name: Show list of system-images - command: yes | sdkmanager --licenses | sdkmanager --list --verbose | grep system-images + command: sdkmanager --list --verbose | grep system-images - run: name: Setup Emulator command: sdkmanager "system-images;android-21;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-21;default;armeabi-v7a" From 1fe87731fae92b667b1593c9540c416dbb8d29cc Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sat, 26 Jan 2019 21:53:15 +0530 Subject: [PATCH 09/21] License removed --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index be027e2f..1479d423 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,9 +13,6 @@ jobs: - run: name: Chmod permissions command: sudo chmod +x ./gradlew - - run: - name: Accept licenses - command: yes | sdkmanager --licenses - run: name: Download Dependencies command: ./gradlew androidDependencies From 237feec7a27641930f8cc9a55e2105cc2bf96a47 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sat, 26 Jan 2019 22:01:37 +0530 Subject: [PATCH 10/21] Support 28 --- app/build.gradle | 6 +++--- photoeditor/build.gradle | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 46ddfefb..c211ac46 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,12 +20,12 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.android.support:design:27.1.1' + implementation 'com.android.support:design:28.0.0' implementation 'ja.burhanrashid52:photoeditor:0.3.3' //implementation project(':photoeditor') - implementation 'com.android.support:cardview-v7:27.1.1' + implementation 'com.android.support:cardview-v7:28.0.0' } // make sure this line comes *after* you apply the Android plugin diff --git a/photoeditor/build.gradle b/photoeditor/build.gradle index 082c7346..56efcb0a 100644 --- a/photoeditor/build.gradle +++ b/photoeditor/build.gradle @@ -27,12 +27,12 @@ ext { } android { - compileSdkVersion 28 - buildToolsVersion '28.0.3' + compileSdkVersion 27 + buildToolsVersion '27.0.3' defaultConfig { minSdkVersion 14 - targetSdkVersion 28 + targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -63,5 +63,5 @@ dependencies { } // Place it at the end of the file -apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' -apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' +//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' +//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' From 98db54617febb7cfda3dff0f5f1cca37a83549c7 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sat, 26 Jan 2019 22:01:59 +0530 Subject: [PATCH 11/21] Support 28 --- photoeditor/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/photoeditor/build.gradle b/photoeditor/build.gradle index 56efcb0a..8d13eb61 100644 --- a/photoeditor/build.gradle +++ b/photoeditor/build.gradle @@ -27,6 +27,7 @@ ext { } android { + compileSdkVersion 27 buildToolsVersion '27.0.3' From aa7a1038e574fc2e13337b806074ab6d0f39da44 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sat, 26 Jan 2019 22:04:21 +0530 Subject: [PATCH 12/21] Support 28 --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1479d423..fe74918d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,6 +25,9 @@ jobs: command: android list target environment: TERM: dumb + - run: + name: Accept licenses + command: yes | sdkmanager --licenses - run: name: Show list of system-images command: sdkmanager --list --verbose | grep system-images From c426fab870d377d845ef7c143e2344d0fd2c4d85 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sat, 26 Jan 2019 22:14:14 +0530 Subject: [PATCH 13/21] Build tool updated --- .circleci/config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fe74918d..6ab3768f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,15 +25,12 @@ jobs: command: android list target environment: TERM: dumb - - run: - name: Accept licenses - command: yes | sdkmanager --licenses - run: name: Show list of system-images - command: sdkmanager --list --verbose | grep system-images + command: yes | sdkmanager --licenses | sdkmanager --list --verbose | grep system-images - run: name: Setup Emulator - command: sdkmanager "system-images;android-21;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-21;default;armeabi-v7a" + command: sdkmanager "system-images;android-27;build-tools;27.0.3;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-27;build-tools;27.0.3;default;armeabi-v7a" - run: name: Launch Emulator command: | From 8600e7445dedaed2a61bda3bfad76a1389e2f93e Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sat, 26 Jan 2019 22:17:42 +0530 Subject: [PATCH 14/21] Remove build tools --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ab3768f..f46b3107 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,9 @@ jobs: - run: name: Chmod permissions command: sudo chmod +x ./gradlew + - run: + name: Accept licenses + command: sdkmanager --update && yes | sdkmanager --licenses - run: name: Download Dependencies command: ./gradlew androidDependencies @@ -27,10 +30,10 @@ jobs: TERM: dumb - run: name: Show list of system-images - command: yes | sdkmanager --licenses | sdkmanager --list --verbose | grep system-images + command: sdkmanager --list --verbose | grep system-images - run: name: Setup Emulator - command: sdkmanager "system-images;android-27;build-tools;27.0.3;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-27;build-tools;27.0.3;default;armeabi-v7a" + command: sdkmanager "system-images;android-21;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-21;default;armeabi-v7a" - run: name: Launch Emulator command: | From 08bf9081bf6a6d39a4e461901f1489bf311c3791 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sat, 26 Jan 2019 22:21:44 +0530 Subject: [PATCH 15/21] Remove build tools --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f46b3107..0b75c8d2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,12 +13,12 @@ jobs: - run: name: Chmod permissions command: sudo chmod +x ./gradlew - - run: - name: Accept licenses - command: sdkmanager --update && yes | sdkmanager --licenses - run: name: Download Dependencies command: ./gradlew androidDependencies + - run: + name: Accept licenses + command: sdkmanager --update && yes | sdkmanager --licenses - save_cache: paths: - ~/.gradle From 776d8dd683236d55d0bc3ee6490f9277409790fe Mon Sep 17 00:00:00 2001 From: newbie_s_patil <36434978+shadjachaudhari13@users.noreply.github.com> Date: Sat, 26 Jan 2019 23:30:09 +0530 Subject: [PATCH 16/21] Update config.yml --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b75c8d2..411fb8b1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,12 +13,12 @@ jobs: - run: name: Chmod permissions command: sudo chmod +x ./gradlew + - run: + name: Accept licenses + command: yes | sdkmanager --licenses || true - run: name: Download Dependencies command: ./gradlew androidDependencies - - run: - name: Accept licenses - command: sdkmanager --update && yes | sdkmanager --licenses - save_cache: paths: - ~/.gradle @@ -56,4 +56,4 @@ jobs: path: app/build/reports destination: reports - store_test_results: - path: app/build/test-results \ No newline at end of file + path: app/build/test-results From 29a5d9e12979c0df5ecd68eb0d37bfaefe83a3f8 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sun, 27 Jan 2019 09:08:27 +0530 Subject: [PATCH 17/21] Accept Licenses --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b75c8d2..e0b001d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,8 +17,8 @@ jobs: name: Download Dependencies command: ./gradlew androidDependencies - run: - name: Accept licenses - command: sdkmanager --update && yes | sdkmanager --licenses + name: Accept licenses + command: yes | sdkmanager --licenses || true - save_cache: paths: - ~/.gradle From 610449507a1965f7690114341e8a25a7243b82f0 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sun, 27 Jan 2019 09:10:30 +0530 Subject: [PATCH 18/21] Accept Licenses changes --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e0b001d4..761b3126 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,12 +13,12 @@ jobs: - run: name: Chmod permissions command: sudo chmod +x ./gradlew + - run: + name: Accept licenses + command: yes | sdkmanager --licenses || true - run: name: Download Dependencies command: ./gradlew androidDependencies - - run: - name: Accept licenses - command: yes | sdkmanager --licenses || true - save_cache: paths: - ~/.gradle From 3393c40899f3a01fd1e87fcdd93c0c1d4960e7d0 Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sun, 27 Jan 2019 09:44:12 +0530 Subject: [PATCH 19/21] Added tests --- app/build.gradle | 16 +++++++---- .../imageeditor/EditImageActivityTest.java | 28 +++++++++++++++++++ .../imageeditor/SampleTest.java | 14 ++++++++++ 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 app/src/androidTest/java/com/burhanrashid52/imageeditor/EditImageActivityTest.java create mode 100644 app/src/test/java/com/burhanrashid52/imageeditor/SampleTest.java diff --git a/app/build.gradle b/app/build.gradle index c211ac46..8979f675 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 + compileSdkVersion 27 defaultConfig { applicationId "com.burhanrashid52.imageeditor" minSdkVersion 14 - targetSdkVersion 28 + targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -20,12 +20,18 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.android.support:design:28.0.0' + implementation 'com.android.support:design:27.1.1' implementation 'ja.burhanrashid52:photoeditor:0.3.3' //implementation project(':photoeditor') - implementation 'com.android.support:cardview-v7:28.0.0' + implementation 'com.android.support:cardview-v7:27.1.1' + + testImplementation 'junit:junit:4.12' + + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test:rules:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' } // make sure this line comes *after* you apply the Android plugin diff --git a/app/src/androidTest/java/com/burhanrashid52/imageeditor/EditImageActivityTest.java b/app/src/androidTest/java/com/burhanrashid52/imageeditor/EditImageActivityTest.java new file mode 100644 index 00000000..7ad77316 --- /dev/null +++ b/app/src/androidTest/java/com/burhanrashid52/imageeditor/EditImageActivityTest.java @@ -0,0 +1,28 @@ +package com.burhanrashid52.imageeditor; + +import android.support.test.filters.LargeTest; +import android.support.test.rule.ActivityTestRule; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.assertion.ViewAssertions.matches; +import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; +import static android.support.test.espresso.matcher.ViewMatchers.withText; + + +@RunWith(AndroidJUnit4.class) +@LargeTest +public class EditImageActivityTest { + + @Rule + public ActivityTestRule mActivityRule = new ActivityTestRule<>(EditImageActivity.class); + + @Test + public void checkIfActivityIsLaunched() { + onView(withText(R.string.app_name)).check(matches(isDisplayed())); + } +} \ No newline at end of file diff --git a/app/src/test/java/com/burhanrashid52/imageeditor/SampleTest.java b/app/src/test/java/com/burhanrashid52/imageeditor/SampleTest.java new file mode 100644 index 00000000..1cad2790 --- /dev/null +++ b/app/src/test/java/com/burhanrashid52/imageeditor/SampleTest.java @@ -0,0 +1,14 @@ +package com.burhanrashid52.imageeditor; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class SampleTest { + + @Test + public void testAddition() { + assertEquals(6, 3 + 3); + } + +} \ No newline at end of file From 2307ccfd30a0169f5fb082f65e9122f9345da00d Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sun, 27 Jan 2019 09:58:53 +0530 Subject: [PATCH 20/21] Added apk artifact --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 411fb8b1..487cceab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,5 +55,8 @@ jobs: - store_artifacts: path: app/build/reports destination: reports + - store_artifacts: + path: app/build/outputs/apk + destination: apks - store_test_results: path: app/build/test-results From 690430bbf05475745154d0ef5ce0c0f1e78a268f Mon Sep 17 00:00:00 2001 From: Burhanuddin Rashid Date: Sun, 27 Jan 2019 10:21:15 +0530 Subject: [PATCH 21/21] Added Status Badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0f201791..fa334159 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # PhotoEditor +[![CircleCI](https://circleci.com/gh/burhanrashid52/PhotoEditor.svg?style=svg)](https://circleci.com/gh/burhanrashid52/PhotoEditor) [![Downloads](https://img.shields.io/badge/Download-0.3.3-blue.svg)](https://bintray.com/burhanrashid52/maven/photoeditor) ![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg) [![JavaDoc](https://img.shields.io/badge/JavaDoc-PhotoEditor-blue.svg)](https://burhanrashid52.github.io/PhotoEditor/) [![Uplabs](https://img.shields.io/badge/Uplabs-PhotoEditor-orange.svg)](https://www.uplabs.com/posts/photoeditor) [![AndroidArsenal](https://img.shields.io/badge/Android%20Arsenal-PhotoEditor-blue.svg)](https://android-arsenal.com/details/1/6736) [![AndroidDevDigest](https://img.shields.io/badge/AndroidDev%20Digest-%23185-brightgreen.svg)](https://www.androiddevdigest.com/digest-185)