Skip to content

Commit

Permalink
Deprecate RenderScriptBlur and update gradle plugin and target sdk.
Browse files Browse the repository at this point in the history
Remove SupportRenderScriptBlur
  • Loading branch information
Dimezis committed Apr 2, 2022
1 parent b3a30c9 commit d39e670
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 180 deletions.
14 changes: 9 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
compileSdkVersion 32

defaultConfig {
renderscriptTargetApi 29
renderscriptTargetApi 32
renderscriptSupportModeEnabled true
applicationId "com.eightbitlab.blurview_sample"
minSdkVersion 14
targetSdkVersion 29
minSdkVersion 17
targetSdkVersion 32
versionCode 3
versionName "1.1"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -32,5 +37,4 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.1.0'

implementation project(':library')
implementation project(':supportrenderscriptblur')
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.view.ViewGroup;
import android.widget.SeekBar;

import com.eightbitlab.supportrenderscriptblur.SupportRenderScriptBlur;
import com.google.android.material.tabs.TabLayout;

import androidx.appcompat.app.AppCompatActivity;
Expand All @@ -14,6 +13,7 @@
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import eightbitlab.com.blurview.BlurView;
import eightbitlab.com.blurview.RenderScriptBlur;

public class MainActivity extends AppCompatActivity {

Expand Down Expand Up @@ -58,13 +58,13 @@ private void setupBlurView() {

topBlurView.setupWith(root)
.setFrameClearDrawable(windowBackground)
.setBlurAlgorithm(new SupportRenderScriptBlur(this))
.setBlurAlgorithm(new RenderScriptBlur(this))
.setBlurRadius(radius)
.setHasFixedTransformationMatrix(true);

bottomBlurView.setupWith(root)
.setFrameClearDrawable(windowBackground)
.setBlurAlgorithm(new SupportRenderScriptBlur(this))
.setBlurAlgorithm(new RenderScriptBlur(this))
.setBlurRadius(radius)
.setHasFixedTransformationMatrix(true);

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
}
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def getVersionName() {
}

android {
compileSdkVersion 29
compileSdkVersion 32

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -32,7 +32,7 @@ android {

defaultConfig {
minSdkVersion 14
targetSdkVersion 29
targetSdkVersion 32
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
import androidx.annotation.RequiresApi;

/**
* Blur using RenderScript, processed on GPU.
* Blur using RenderScript, processed on GPU (when device drivers support it).
* Requires API 17+
* @deprecated because RenderScript is deprecated and its hardware acceleration is not guaranteed
*/
@Deprecated
public final class RenderScriptBlur implements BlurAlgorithm {
private final RenderScript renderScript;
private final ScriptIntrinsicBlur blurScript;
Expand Down
1 change: 0 additions & 1 deletion supportrenderscriptblur/.gitignore

This file was deleted.

79 changes: 0 additions & 79 deletions supportrenderscriptblur/build.gradle

This file was deleted.

3 changes: 0 additions & 3 deletions supportrenderscriptblur/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

0 comments on commit d39e670

Please sign in to comment.