8000 Merge pull request #38 from wasabeef/v2.0.1 · coder0728/glide-transformations@c3f09cd · GitHub
[go: up one dir, main page]

Skip to content

Commit c3f09cd

Browse files
committed
Merge pull request wasabeef#38 from wasabeef/v2.0.1
V2.0.1
2 parents 4d71908 + ddd76d4 commit c3f09cd

File tree

11 files changed

+79
-71
lines changed

11 files changed

+79
-71
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change Log
22
==========
33

4+
Version 2.0.1 *(2016-04-21)*
5+
----------------------------
6+
7+
Fix:
8+
[#35](https://github.com/wasabeef/glide-transformations/issues/35)
9+
RSInvalidStateException
10+
411
Version 2.0.0 *(2016-03-02)*
512
----------------------------
613

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repositories {
3333
}
3434
3535
dependencies {
36-
compile 'jp.wasabeef:glide-transformations:2.0.0'
36+
compile 'jp.wasabeef:glide-transformations:2.0.1'
3737
// If you want to use the GPU Filters
3838
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
3939
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.0.0-beta6'
8+
classpath 'com.android.tools.build:gradle:2.0.0'
99
classpath 'com.novoda:bintray-release:0.3.4'
1010
}
1111
}

example/build.gradle

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion COMPILE_SDK_VERSION as int
5-
buildToolsVersion BUILD_TOOLS_VERSION
6-
7-
defaultConfig {
8-
minSdkVersion MIN_SDK_VERSION as int
9-
targetSdkVersion TARGET_SDK_VERSION as int
10-
versionCode "git rev-list origin/master --count".execute().text.toInteger()
11-
versionName VERSION_NAME
4+
compileSdkVersion COMPILE_SDK_VERSION as int
5+
buildToolsVersion BUILD_TOOLS_VERSION
6+
7+
defaultConfig {
8+
minSdkVersion MIN_SDK_VERSION as int
9+
targetSdkVersion TARGET_SDK_VERSION as int
10+
versionCode "git rev-list origin/master --count".execute().text.toInteger()
11+
versionName VERSION_NAME
12+
}
13+
14+
signingConfigs {
15+
release {
16+
storeFile file(keyStoreProperty)
17+
keyAlias keyAliasProperty
18+
storePassword keyStorePasswordProperty
19+
keyPassword keyAliasPasswordProperty
1220
}
21+
}
1322

14-
signingConfigs {
15-
release {
16-
storeFile file(keyStoreProperty)
17-
keyAlias keyAliasProperty
18-
storePassword keyStorePasswordProperty
19-
keyPassword keyAliasPasswordProperty
20-
}
23+
buildTypes {
24+
debug {
25+
debuggable true
26+
zipAlignEnabled true
2127
}
22-
23-
buildTypes {
24-
debug {
25-
debuggable true
26-
zipAlignEnabled true
27-
}
28-
release {
29-
debuggable false
30-
zipAlignEnabled true
31-
signingConfig signingConfigs.release
32-
}
28+
release {
29+
debuggable false
30+
zipAlignEnabled true
31+
signingConfig signingConfigs.release
3332
}
33+
}
3434
}
3535

3636
def getKeyStoreProperty() {
37-
return hasProperty('WASABEEF_KEYSTORE') ? WASABEEF_KEYSTORE : "debug.keystore"
37+
return hasProperty('WASABEEF_KEYSTORE') ? WASABEEF_KEYSTORE : "debug.keystore"
3838
}
3939

4040
def getKeyAliasProperty() {
41-
return hasProperty('WASABEEF_KEYALIAS') ? WASABEEF_KEYALIAS : "android"
41+
return hasProperty('WASABEEF_KEYALIAS') ? WASABEEF_KEYALIAS : "android"
4242
}
4343

4444
def getKeyStorePasswordProperty() {
45-
return hasProperty('WASABEEF_KEYSTOREPASSWORD') ? WASABEEF_KEYSTOREPASSWORD : "androiddebugkey"
45+
return hasProperty('WASABEEF_KEYSTOREPASSWORD') ? WASABEEF_KEYSTOREPASSWORD : "androiddebugkey"
4646
}
4747

4848
def getKeyAliasPasswordProperty() {
49-
return hasProperty('WASABEEF_KEYALIASPASSWORD') ? WASABEEF_KEYALIASPASSWORD : "android"
49+
return hasProperty('WASABEEF_KEYALIASPASSWORD') ? WASABEEF_KEYALIASPASSWORD : "android"
5050
}
5151

5252
dependencies {
53-
compile project(':transformations')
54-
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
55-
compile "jp.co.cyberagent.android.gpuimage:gpuimage-library:${GPUIMAGE_VERSION}"
56-
compile "com.android.support:appcompat-v7:${SUPPORT_PACKAGE_VERSION}"
57-
compile "com.android.support:recyclerview-v7:${SUPPORT_PACKAGE_VERSION}"
53+
compile project(':transformations')
54+
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
55+
compile "jp.co.cyberagent.android.gpuimage:gpuimage-library:${GPUIMAGE_VERSION}"
56+
compile "com.android.support:appcompat-v7:${SUPPORT_PACKAGE_VERSION}"
57+
compile "com.android.support:recyclerview-v7:${SUPPORT_PACKAGE_VERSION}"
5858
}

example/src/main/res/layout/layout_list_item.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
android:layout_width="match_parent"
4-
android:layout_height="match_parent"
4+
android:layout_height="wrap_content"
55
android:padding="5dp"
66
>
77

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION_NAME=2.0.0
1+
VERSION_NAME=2.0.1
22
GROUP=jp.wasabeef
33
ARTIFACT_ID=glide-transformations
44

@@ -21,6 +21,6 @@ POM_DEVELOPER_EMAIL=dadadada.chop@gmail.com
2121
POM_DEVELOPER_URL=wasabeef.jp
2222
ISSUE_URL=https://github.com/wasabeef/glide-transformations/issues
2323

24-
SUPPORT_PACKAGE_VERSION=23.1.1
24+
SUPPORT_PACKAGE_VERSION=23.2.1
2525
GLIDE_VERSION=3.7.0
2626
GPUIMAGE_VERSION=1.3.0

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip
77

transformations/build.gradle

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,49 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.novoda.bintray-release'
33

44
android {
5-
compileSdkVersion COMPILE_SDK_VERSION as int
6-
buildToolsVersion BUILD_TOOLS_VERSION
5+
compileSdkVersion COMPILE_SDK_VERSION as int
6+
buildToolsVersion BUILD_TOOLS_VERSION
77

8-
defaultConfig {
9-
minSdkVersion MIN_SDK_VERSION as int
10-
targetSdkVersion TARGET_SDK_VERSION as int
11-
versionCode "git rev-list origin/master --count".execute().text.toInteger()
12-
versionName VERSION_NAME
8+
defaultConfig {
9+
minSdkVersion MIN_SDK_VERSION as int
10+
targetSdkVersion TARGET_SDK_VERSION as int
11+
versionCode "git rev-list origin/master --count".execute().text.toInteger()
12+
versionName VERSION_NAME
1313

14-
consumerProguardFiles 'proguard-rules.txt'
15-
}
14+
consumerProguardFiles 'proguard-rules.txt'
15+
}
1616
}
1717

1818
dependencies {
19-
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
20-
provided "jp.co.cyberagent.android.gpuimage:gpuimage-library:${GPUIMAGE_VERSION}"
19+
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
20+
provided "jp.co.cyberagent.android.gpuimage:gpuimage-library:${GPUIMAGE_VERSION}"
2121
}
2222

2323
task androidJavadocs(type: Javadoc) {
24-
source = android.sourceSets.main.java.srcDirs
25-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
24+
source = android.sourceSets.main.java.srcDirs
25+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
2626
}
2727

2828
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
29-
classifier = 'javadoc'
30-
from androidJavadocs.destinationDir
29+
classifier = 'javadoc'
30+
from androidJavadocs.destinationDir
3131
}
3232

3333
task androidSourcesJar(type: Jar) {
34-
classifier = 'sources'
35-
from android.sourceSets.main.java.srcDirs
34+
classifier = 'sources'
35+
from android.sourceSets.main.java.srcDirs
3636
}
3737

3838
artifacts {
39-
archives androidSourcesJar
40-
archives androidJavadocsJar
39+
archives androidSourcesJar
40+
archives androidJavadocsJar
4141
}
4242

4343
publish {
44-
userOrg = POM_DEVELOPER_ID
45-
groupId = GROUP
46-
artifactId = ARTIFACT_ID
47-
publishVersion = VERSION_NAME
48-
desc = POM_DESCRIPTION
49-
website = POM_URL
44+
userOrg = POM_DEVELOPER_ID
45+
groupId = GROUP
46+
artifactId = ARTIFACT_ID
47+
publishVersion = VERSION_NAME
48+
desc = POM_DESCRIPTION
49+
website = POM_URL
5050
}

transformations/src/androidTest/java/jp/wasabeef/glide/transformations/ApplicationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
public class ApplicationTest extends ApplicationTestCase<Application> {
1010

11-
public ApplicationTest() {
12-
super(Application.class);
13-
}
11+
public ApplicationTest() {
12+
super(Application.class);
13+
}
1414
}

transformations/src/main/java/jp/wasabeef/glide/transformations/BlurTransformation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public Resource<Bitmap> transform(Resource<Bitmap> resource, int outWidth, int o
8888
paint.setFlags(Paint.FILTER_BITMAP_FLAG);
8989
canvas.drawBitmap(source, 0, 0, paint);
9090

91-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
91+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
9292
try {
9393
bitmap = RSBlur.blur(mContext, bitmap, mRadius);
9494
} catch (RSRuntimeException e) {

transformations/src/main/java/jp/wasabeef/glide/transformations/internal/RSBlur.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828

2929
public class RSBlur {
3030

31-
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
31+
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
3232
public static Bitmap blur(Context context, Bitmap bitmap, int radius) throws RSRuntimeException {
3333
RenderScript rs = null;
3434
try {
3535
4E24 rs = RenderScript.create(context);
36+
rs.setMessageHandler(new RenderScript.RSMessageHandler());
3637
Allocation input =
3738
Allocation.createFromBitmap(rs, bitmap, Allocation.MipmapControl.MIPMAP_NONE,
3839
Allocation.USAGE_SCRIPT);

0 commit comments

Comments
 (0)
0