Skip to content

Commit

Permalink
- Update to sdk v27
Browse files Browse the repository at this point in the history
- Update to gradle v3
  • Loading branch information
ArthurHub committed Dec 9, 2017
1 parent b398cc3 commit 161a132
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android:
- tools
- platform-tools
- tools
- build-tools-26.0.1
- android-26
- build-tools-27.0.2
- android-27
- extra-android-m2repository

script:
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Android Image Cropper
1. Include the library

```
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.+'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
```

Add permissions to manifest
Expand Down Expand Up @@ -121,7 +121,11 @@ For more information, see the [GitHub Wiki](https://github.com/ArthurHub/Android
- [Adding auto-zoom feature to Android-Image-Cropper](https://theartofdev.com/2016/04/25/adding-auto-zoom-feature-to-android-image-cropper/)

## Change log
*2.5.1* (in-dev)
*2.6.0*
- Update to sdk v27
- Update to gradle v3

*2.5.1*
- Try solve manifest merger issue by adding `transitive` flag #405 (thx @j-garin)
- Use thread pool executors for async image loading and cropping operations to prevent app hang if default executor is busy (thx @ruifcardoso)
- Fix image rotation breaking min/max crop result restrictions #401
Expand Down
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.1'
}
}

Expand All @@ -17,12 +18,12 @@ allprojects {
}

ext {
compileSdkVersion = 26
buildToolsVersion = '26.0.2'
supportLibraryVersion = '26.+'
compileSdkVersion = 27
buildToolsVersion = '27.0.2'
supportLibraryVersion = '27.+'

PUBLISH_GROUP_ID = 'com.theartofdev.edmodo'
PUBLISH_ARTIFACT_ID = 'android-image-cropper'
PUBLISH_VERSION = '2.5.1'
PUBLISH_VERSION = '2.6.0'
// gradlew clean build generateRelease
}
10 changes: 4 additions & 6 deletions cropper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion rootProject.compileSdkVersion
versionCode 1
versionName PUBLISH_VERSION
}
Expand Down Expand Up @@ -39,12 +39,10 @@ publishing {
}
}

apply from: 'https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-aar.gradle'
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'

dependencies {
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
compile("com.android.support:exifinterface:$supportLibraryVersion") {
transitive = false
}
api "com.android.support:appcompat-v7:$supportLibraryVersion"
implementation "com.android.support:exifinterface:$supportLibraryVersion"
}

Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public CropImageView.CropShape getCropShape() {
public void setCropShape(CropImageView.CropShape cropShape) {
if (mCropShape != cropShape) {
mCropShape = cropShape;
if (Build.VERSION.SDK_INT >= 11 && Build.VERSION.SDK_INT <= 17) {
if (Build.VERSION.SDK_INT <= 17) {
if (mCropShape == CropImageView.CropShape.OVAL) {
mOriginalLayerType = getLayerType();
if (mOriginalLayerType != View.LAYER_TYPE_SOFTWARE) {
Expand Down Expand Up @@ -320,8 +320,7 @@ public void setSnapRadius(float snapRadius) {

/** Set multi touch functionality to enabled/disabled. */
public boolean setMultiTouchEnabled(boolean multiTouchEnabled) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
&& mMultiTouchEnabled != multiTouchEnabled) {
if (mMultiTouchEnabled != multiTouchEnabled) {
mMultiTouchEnabled = multiTouchEnabled;
if (mMultiTouchEnabled && mScaleDetector == null) {
mScaleDetector = new ScaleGestureDetector(getContext(), new ScaleListener());
Expand Down Expand Up @@ -626,9 +625,7 @@ private void drawBackground(Canvas canvas) {
}
} else {
mPath.reset();
if (Build.VERSION.SDK_INT >= 11
&& Build.VERSION.SDK_INT <= 17
&& mCropShape == CropImageView.CropShape.OVAL) {
if (Build.VERSION.SDK_INT <= 17 && mCropShape == CropImageView.CropShape.OVAL) {
mDrawRect.set(rect.left + 2, rect.top + 2, rect.right - 2, rect.bottom - 2);
} else {
mDrawRect.set(rect.left, rect.top, rect.right, rect.bottom);
Expand Down
6 changes: 3 additions & 3 deletions quick-start/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android {

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion rootProject.compileSdkVersion
versionCode 1
versionName '1.0'
}
Expand All @@ -16,6 +16,6 @@ android {
}

dependencies {
compile project(':cropper')
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
api project(':cropper')
api "com.android.support:appcompat-v7:$supportLibraryVersion"
}
6 changes: 3 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android {

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion rootProject.compileSdkVersion
versionCode 1
versionName '1.0'
}
Expand All @@ -16,6 +16,6 @@ android {
}

dependencies {
compile project(':cropper')
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
api project(':cropper')
api "com.android.support:appcompat-v7:$supportLibraryVersion"
}
6 changes: 3 additions & 3 deletions test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android {

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName '1.0'
}
Expand All @@ -16,7 +16,7 @@ android {
}

dependencies {
compile "com.android.support:appcompat-v7:26.0.2"
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.+'
api "com.android.support:appcompat-v7:27.0.2"
api 'com.theartofdev.edmodo:android-image-cropper:2.6.+'

}

0 comments on commit 161a132

Please sign in to comment.