Skip to content

Commit 161a132

Browse files
committed
- Update to sdk v27
- Update to gradle v3
1 parent b398cc3 commit 161a132

File tree

8 files changed

+30
-30
lines changed

8 files changed

+30
-30
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android:
77
- tools
88
- platform-tools
99
- tools
10-
- build-tools-26.0.1
11-
- android-26
10+
- build-tools-27.0.2
11+
- android-27
1212
- extra-android-m2repository
1313

1414
script:

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Android Image Cropper
1717
1. Include the library
1818

1919
```
20-
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.+'
20+
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
2121
```
2222

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

123123
## Change log
124-
*2.5.1* (in-dev)
124+
*2.6.0*
125+
- Update to sdk v27
126+
- Update to gradle v3
127+
128+
*2.5.1*
125129
- Try solve manifest merger issue by adding `transitive` flag #405 (thx @j-garin)
126130
- Use thread pool executors for async image loading and cropping operations to prevent app hang if default executor is busy (thx @ruifcardoso)
127131
- Fix image rotation breaking min/max crop result restrictions #401

build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
buildscript {
22
repositories {
33
jcenter()
4+
google()
45
}
56
dependencies {
6-
classpath 'com.android.tools.build:gradle:2.3.3'
7+
classpath 'com.android.tools.build:gradle:3.0.1'
78
}
89
}
910

@@ -17,12 +18,12 @@ allprojects {
1718
}
1819

1920
ext {
20-
compileSdkVersion = 26
21-
buildToolsVersion = '26.0.2'
22-
supportLibraryVersion = '26.+'
21+
compileSdkVersion = 27
22+
buildToolsVersion = '27.0.2'
23+
supportLibraryVersion = '27.+'
2324

2425
PUBLISH_GROUP_ID = 'com.theartofdev.edmodo'
2526
PUBLISH_ARTIFACT_ID = 'android-image-cropper'
26-
PUBLISH_VERSION = '2.5.1'
27+
PUBLISH_VERSION = '2.6.0'
2728
// gradlew clean build generateRelease
2829
}

cropper/build.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
buildToolsVersion rootProject.buildToolsVersion
1010
defaultConfig {
1111
minSdkVersion 14
12-
targetSdkVersion 26
12+
targetSdkVersion rootProject.compileSdkVersion
1313
versionCode 1
1414
versionName PUBLISH_VERSION
1515
}
@@ -39,12 +39,10 @@ publishing {
3939
}
4040
}
4141

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

4444
dependencies {
45-
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
46-
compile("com.android.support:exifinterface:$supportLibraryVersion") {
47-
transitive = false
48-
}
45+
api "com.android.support:appcompat-v7:$supportLibraryVersion"
46+
implementation "com.android.support:exifinterface:$supportLibraryVersion"
4947
}
5048

cropper/src/main/java/com/theartofdev/edmodo/cropper/CropOverlayView.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public CropImageView.CropShape getCropShape() {
204204
public void setCropShape(CropImageView.CropShape cropShape) {
205205
if (mCropShape != cropShape) {
206206
mCropShape = cropShape;
207-
if (Build.VERSION.SDK_INT >= 11 && Build.VERSION.SDK_INT <= 17) {
207+
if (Build.VERSION.SDK_INT <= 17) {
208208
if (mCropShape == CropImageView.CropShape.OVAL) {
209209
mOriginalLayerType = getLayerType();
210210
if (mOriginalLayerType != View.LAYER_TYPE_SOFTWARE) {
@@ -320,8 +320,7 @@ public void setSnapRadius(float snapRadius) {
320320

321321
/** Set multi touch functionality to enabled/disabled. */
322322
public boolean setMultiTouchEnabled(boolean multiTouchEnabled) {
323-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
324-
&& mMultiTouchEnabled != multiTouchEnabled) {
323+
if (mMultiTouchEnabled != multiTouchEnabled) {
325324
mMultiTouchEnabled = multiTouchEnabled;
326325
if (mMultiTouchEnabled && mScaleDetector == null) {
327326
mScaleDetector = new ScaleGestureDetector(getContext(), new ScaleListener());
@@ -626,9 +625,7 @@ private void drawBackground(Canvas canvas) {
626625
}
627626
} else {
628627
mPath.reset();
629-
if (Build.VERSION.SDK_INT >= 11
630-
&& Build.VERSION.SDK_INT <= 17
631-
&& mCropShape == CropImageView.CropShape.OVAL) {
628+
if (Build.VERSION.SDK_INT <= 17 && mCropShape == CropImageView.CropShape.OVAL) {
632629
mDrawRect.set(rect.left + 2, rect.top + 2, rect.right - 2, rect.bottom - 2);
633630
} else {
634631
mDrawRect.set(rect.left, rect.top, rect.right, rect.bottom);

quick-start/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ android {
66

77
defaultConfig {
88
minSdkVersion 14
9-
targetSdkVersion 26
9+
targetSdkVersion rootProject.compileSdkVersion
1010
versionCode 1
1111
versionName '1.0'
1212
}
@@ -16,6 +16,6 @@ android {
1616
}
1717

1818
dependencies {
19-
compile project(':cropper')
20-
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
19+
api project(':cropper')
20+
api "com.android.support:appcompat-v7:$supportLibraryVersion"
2121
}

sample/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ android {
66

77
defaultConfig {
88
minSdkVersion 14
9-
targetSdkVersion 26
9+
targetSdkVersion rootProject.compileSdkVersion
1010
versionCode 1
1111
versionName '1.0'
1212
}
@@ -16,6 +16,6 @@ android {
1616
}
1717

1818
dependencies {
19-
compile project(':cropper')
20-
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
19+
api project(':cropper')
20+
api "com.android.support:appcompat-v7:$supportLibraryVersion"
2121
}

test/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ android {
66

77
defaultConfig {
88
minSdkVersion 14
9-
targetSdkVersion 26
9+
targetSdkVersion 27
1010
versionCode 1
1111
versionName '1.0'
1212
}
@@ -16,7 +16,7 @@ android {
1616
}
1717

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

2222
}

0 commit comments

Comments
 (0)