Skip to content

Commit

Permalink
Merge pull request #164 from burhanrashid52/release.0.4.0
Browse files Browse the repository at this point in the history
Release.0.4.0
  • Loading branch information
burhanrashid52 authored Jun 13, 2019
2 parents 5872f87 + 1ba4504 commit 238042b
Show file tree
Hide file tree
Showing 24 changed files with 1,166 additions and 131 deletions.
35 changes: 23 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Chmod permissions
command: sudo chmod +x ./gradlew
name: Chmod permissions
command: sudo chmod +x ./gradlew
- run:
name: Accept licenses
command: yes | sdkmanager --licenses || true
name: Accept licenses
command: yes | sdkmanager --licenses || true
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
Expand All @@ -37,21 +37,32 @@ jobs:
- 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
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
circle-android wait-for-boot
adb shell input keyevent 82
- run:
name: Run Espresso UI Tests
name: Run apps espresso UI tests
command: ./gradlew :app:connectedDebugAndroidTest
- run:
name: Run UnitTest
command: ./gradlew testDebugUnitTest
name: Run apps UnitTest
command: ./gradlew :app:testDebugUnitTest
- run:
name: Run photoeditor espresso UI tests
command: ./gradlew connectedDebugAndroidTest
- run:
name: Run apps unit tests
command: ./gradlew test
- store_artifacts:
path: photoeditor/build/reports
destination: reports
- store_test_results:
path: photoeditor/build/test-results
- store_artifacts:
path: app/build/reports
destination: reports
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,26 @@ mPhotoEditor.setFilterEffect(customEffect);

## 0.3.3
- Fixed : Brush bug using PorterDuff.Mode.SRC_OVER #80 and PR #83

## 0.4.0
- New : Added compress quality and format in save settings
```
SaveSettings saveSettings = new SaveSettings.Builder()
.setCompressFormat(compressFormat)
.setCompressQuality(compressQuality)
.build();
```
- New : Added Text style builder for add and edit text
```
new TextStyleBuilder()
.withTextColor(123)
.withTextSize(12f)
.withGravity(3)
.withTextFont(Typeface.DEFAULT)
.withBackgroundColor(321)
.withTextAppearance(144)
.applyStyle(textView);
```
- New : Bumped support version to 28
- Removed : All Deprecated methods
- Test : Added test cases for `BrushDrawingView` with 100% code coverage
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## How to contribute?

1. Fork the project.
2. Make required changes and commit.
3. Generate pull request. Mention all the required description regarding changes you made.
1. Create an issue first to discuss about the changes you are suggesting.
2. Fork the project.
3. Create a branch with name PE-[#Issue No.] Ex : PE-146
4. Make required changes and commit to that branch.
5. Generate pull request. Mention all the required description regarding changes you made.

Happy coding.:-)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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)
[![Downloads](https://img.shields.io/badge/Download-0.4.0-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)
Expand Down Expand Up @@ -34,7 +34,7 @@ A Photo Editor library with simple, easy support for image editing using Paints,
## Getting Started
To start with this, we need to simply add the dependencies in the gradle file of our app module like this
```java
implementation 'ja.burhanrashid52:photoeditor:0.3.3'
implementation 'ja.burhanrashid52:photoeditor:0.4.0'
```
or we can also import the :photoeditor module from sample for further customization

Expand Down Expand Up @@ -144,7 +144,7 @@ Now we can edit the text with a view like this
`mPhotoEditor.editText(rootView, inputText, colorCode);`
If you want more customization on text. Please refer the wiki page for more details.
## Emoji
Expand Down
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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 'ja.burhanrashid52:photoeditor:0.3.3'
implementation 'com.android.support:design:28.0.0'
implementation 'ja.burhanrashid52:photoeditor:0.4.0'
//implementation project(':photoeditor')
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:28.0.0'

testImplementation 'junit:junit:4.12'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
import ja.burhanrashid52.photoeditor.OnPhotoEditorListener;
import ja.burhanrashid52.photoeditor.PhotoEditor;
import ja.burhanrashid52.photoeditor.PhotoEditorView;
import ja.burhanrashid52.photoeditor.PhotoFilter;
import ja.burhanrashid52.photoeditor.SaveSettings;
import ja.burhanrashid52.photoeditor.TextStyleBuilder;
import ja.burhanrashid52.photoeditor.ViewType;
import ja.burhanrashid52.photoeditor.PhotoFilter;

public class EditImageActivity extends BaseActivity implements OnPhotoEditorListener,
View.OnClickListener,
Expand Down Expand Up @@ -147,7 +148,10 @@ public void onEditTextChangeListener(final View rootView, String text, int color
textEditorDialogFragment.setOnTextEditorListener(new TextEditorDialogFragment.TextEditor() {
@Override
public void onDone(String inputText, int colorCode) {
mPhotoEditor.editText(rootView, inputText, colorCode);
final TextStyleBuilder styleBuilder = new TextStyleBuilder();
styleBuilder.withTextColor(colorCode);

mPhotoEditor.editText(rootView, inputText, styleBuilder);
mTxtCurrentTool.setText(R.string.label_text);
}
});
Expand All @@ -158,11 +162,6 @@ public void onAddViewListener(ViewType viewType, int numberOfAddedViews) {
Log.d(TAG, "onAddViewListener() called with: viewType = [" + viewType + "], numberOfAddedViews = [" + numberOfAddedViews + "]");
}

@Override
public void onRemoveViewListener(int numberOfAddedViews) {
Log.d(TAG, "onRemoveViewListener() called with: numberOfAddedViews = [" + numberOfAddedViews + "]");
}

@Override
public void onRemoveViewListener(ViewType viewType, int numberOfAddedViews) {
Log.d(TAG, "onRemoveViewListener() called with: viewType = [" + viewType + "], numberOfAddedViews = [" + numberOfAddedViews + "]");
Expand Down Expand Up @@ -354,7 +353,10 @@ public void onToolSelected(ToolType toolType) {
textEditorDialogFragment.setOnTextEditorListener(new TextEditorDialogFragment.TextEditor() {
@Override
public void onDone(String inputText, int colorCode) {
mPhotoEditor.addText(inputText, colorCode);
final TextStyleBuilder styleBuilder = new TextStyleBuilder();
styleBuilder.withTextColor(colorCode);

mPhotoEditor.addText(inputText, styleBuilder);
mTxtCurrentTool.setText(R.string.label_text);
}
});
Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.
25 changes: 18 additions & 7 deletions photoeditor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ext {
siteUrl = 'https://github.com/burhanrashid52/PhotoEditor'
gitUrl = 'https://github.com/burhanrashid52/PhotoEditor'

libraryVersion = '0.3.3'
libraryVersion = '0.4.0'

developerId = 'burhanrashid52'
developerName = 'Burhanuddin Rashid'
Expand All @@ -28,12 +28,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"
Expand All @@ -46,6 +46,12 @@ android {
}
}

testOptions {
unitTests {
includeAndroidResources = true
}
}

tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
Expand All @@ -55,12 +61,17 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation "com.android.support:support-v13:28.0.0"

androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "com.android.support:support-v13:27.1.1"
androidTestImplementation 'junit:junit:4.12'

testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'
testImplementation 'org.robolectric:robolectric:4.2'
}

// Place it at the end of the file
Expand Down
Loading

0 comments on commit 238042b

Please sign in to comment.