Skip to content

Commit

Permalink
Javadoc task removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Maliotis committed May 27, 2020
1 parent 0de219a commit 4b30c09
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.maliotis.iosalert.IOSAlert
import com.maliotis.iosalert.IOSClickListener



class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
58 changes: 33 additions & 25 deletions iosalert/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ configurations {
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation fileTree(dir: 'libs', include: ['*.jar', '*'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

myConfig 'com.eightbitlab:blurview:1.6.2'


//myConfig 'com.eightbitlab:blurview:1.6.2'
myConfig 'com.android.support:support-annotations:28.0.0'
}

Expand All @@ -60,27 +62,33 @@ task copyLibs(type: Copy) {
into 'libs'
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

task classesJar(type: Jar) {
from "$buildDir/intermediates/classes/release"
}
//task sourcesJar(type: Jar) {
// classifier = 'sources'
// from android.sourceSets.main.java.sourceFiles
//}
//
//task javadoc(type: Javadoc) {
// source = android.sourceSets.main.java.sourceFiles
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
//}
//
//task javadocJar(type: Jar, dependsOn: javadoc) {
// classifier = 'javadoc'
// from javadoc.destinationDir
//}
//
//task classesJar(type: Jar) {
// from "$buildDir/intermediates/classes/release"
//}

//task javadoc(type: Javadoc) {
// source = android.sourceSets.main.java.srcDirs
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
//}
//
//afterEvaluate {
// javadoc.classpath += files(android.libraryVariants.collect { variant ->
// variant.javaCompile.classpath.files
// })
//}

artifacts {
archives classesJar
archives javadocJar
archives sourcesJar
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import androidx.annotation.IntRange
import androidx.appcompat.app.AppCompatActivity
import androidx.core.graphics.toColor
import androidx.fragment.app.DialogFragment
import eightbitlab.com.blurview.BlurView
import eightbitlab.com.blurview.RenderScriptBlur
import com.maliotis.iosalert.blurview.BlurView
import com.maliotis.iosalert.blurview.RenderScriptBlur


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;



/**
* Blur Controller that handles all blur logic for the attached View.
* It honors View size changes, View animation and Visibility changes.
Expand All @@ -31,7 +31,7 @@ final class BlockingBlurController implements BlurController {
// This will help avoiding an extra bitmap allocation when passing the bitmap to RenderScript for blur.
// Usually it's 16, but on Samsung devices it's 64 for some reason.
private static final int ROUNDING_VALUE = 64;
@ColorInt

static final int TRANSPARENT = 0;

private final float scaleFactor = DEFAULT_SCALE_FACTOR;
Expand Down Expand Up @@ -66,7 +66,7 @@ public boolean onPreDraw() {
private boolean blurEnabled = true;
private boolean initialized;

@Nullable

private Drawable frameClearDrawable;
private boolean hasFixedTransformationMatrix;
private final Paint paint = new Paint(Paint.FILTER_BITMAP_FLAG);
Expand All @@ -77,7 +77,7 @@ public boolean onPreDraw() {
* Can be Activity's root content layout (android.R.id.content)
* or some of your custom root layouts.
*/
BlockingBlurController(@NonNull View blurView, @NonNull ViewGroup rootView, @ColorInt int overlayColor) {
BlockingBlurController( View blurView, ViewGroup rootView, int overlayColor) {
this.rootView = rootView;
this.blurView = blurView;
this.overlayColor = overlayColor;
Expand Down Expand Up @@ -270,7 +270,7 @@ public BlurViewFacade setBlurAlgorithm(BlurAlgorithm algorithm) {
}

@Override
public BlurViewFacade setFrameClearDrawable(@Nullable Drawable frameClearDrawable) {
public BlurViewFacade setFrameClearDrawable( Drawable frameClearDrawable) {
this.frameClearDrawable = frameClearDrawable;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.maliotis.iosalert.blurview;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;




public interface BlurAlgorithm {
/**
Expand Down Expand Up @@ -32,6 +34,6 @@ public interface BlurAlgorithm {
*
* @return bitmap config supported by the given blur algorithm.
*/
@NonNull

Bitmap.Config getSupportedBitmapConfig();
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.util.AttributeSet;
import android.util.Log;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import static eightbitlab.com.blurview.BlockingBlurController.TRANSPARENT;

import com.maliotis.iosalert.R;

import static com.maliotis.iosalert.blurview.BlockingBlurController.TRANSPARENT;


/**
* FrameLayout that blurs its underlying content.
Expand All @@ -22,7 +24,7 @@ public class BlurView extends FrameLayout {

BlurController blurController = new NoOpController();

@ColorInt

private int overlayColor;

public BlurView(Context context) {
Expand Down Expand Up @@ -82,7 +84,7 @@ protected void onAttachedToWindow() {
* or (preferably) some of your layouts. The lower amount of Views are in the root, the better for performance.
* @return {@link BlurView} to setup needed params.
*/
public BlurViewFacade setupWith(@NonNull ViewGroup rootView) {
public BlurViewFacade setupWith( ViewGroup rootView) {
BlurController blurController = new BlockingBlurController(this, rootView, overlayColor);
this.blurController.destroy();
this.blurController = blurController;
Expand All @@ -102,7 +104,7 @@ public BlurViewFacade setBlurRadius(float radius) {
/**
* @see BlurViewFacade#setOverlayColor(int)
*/
public BlurViewFacade setOverlayColor(@ColorInt int overlayColor) {
public BlurViewFacade setOverlayColor( int overlayColor) {
this.overlayColor = overlayColor;
return blurController.setOverlayColor(overlayColor);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.maliotis.iosalert.blurview;

import android.graphics.drawable.Drawable;
import android.support.annotation.ColorInt;
import android.support.annotation.Nullable;


public interface BlurViewFacade {

Expand Down Expand Up @@ -39,7 +38,7 @@ public interface BlurViewFacade {
* Optional, by default frame is cleared with a transparent color.
* @return {@link BlurViewFacade}
*/
BlurViewFacade setFrameClearDrawable(@Nullable Drawable frameClearDrawable);
BlurViewFacade setFrameClearDrawable( Drawable frameClearDrawable);

/**
* @param radius sets the blur radius
Expand All @@ -60,5 +59,5 @@ public interface BlurViewFacade {
* @param overlayColor int color
* @return {@link BlurViewFacade}
*/
BlurViewFacade setOverlayColor(@ColorInt int overlayColor);
BlurViewFacade setOverlayColor( int overlayColor);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.maliotis.iosalert.blurview;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;


class NoOpBlurAlgorithm implements BlurAlgorithm {
@Override
Expand All @@ -18,7 +18,7 @@ public boolean canModifyBitmap() {
return true;
}

@NonNull

@Override
public Bitmap.Config getSupportedBitmapConfig() {
return Bitmap.Config.ARGB_8888;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;



//Used in edit mode and in case if no BlurController was set
class NoOpController implements BlurController {
Expand Down Expand Up @@ -35,7 +36,7 @@ public BlurViewFacade setOverlayColor(int overlayColor) {
}

@Override
public BlurViewFacade setFrameClearDrawable(@Nullable Drawable windowBackground) {
public BlurViewFacade setFrameClearDrawable( Drawable windowBackground) {
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.support.annotation.NonNull;
import android.support.annotation.RequiresApi;




/**
* Blur using RenderScript, processed on GPU.
Expand All @@ -25,7 +26,7 @@ public final class RenderScriptBlur implements BlurAlgorithm {
/**
* @param context Context to create the {@link RenderScript}
*/
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)

public RenderScriptBlur(Context context) {
renderScript = RenderScript.create(context);
blurScript = ScriptIntrinsicBlur.create(renderScript, Element.U8_4(renderScript));
Expand All @@ -40,7 +41,7 @@ private boolean canReuseAllocation(Bitmap bitmap) {
* @param blurRadius blur radius (1..25)
* @return blurred bitmap
*/
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)

@Override
public final Bitmap blur(Bitmap bitmap, float blurRadius) {
//Allocation will use the same backing array of pixels as bitmap if created with USAGE_SHARED flag
Expand Down Expand Up @@ -79,7 +80,7 @@ public boolean canModifyBitmap() {
return true;
}

@NonNull

@Override
public Bitmap.Config getSupportedBitmapConfig() {
return Bitmap.Config.ARGB_8888;
Expand Down
4 changes: 2 additions & 2 deletions iosalert/src/main/res/layout/popup_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_height="wrap_content"
android:background="@android:color/transparent">

<eightbitlab.com.blurview.BlurView
<com.maliotis.iosalert.blurview.BlurView
android:id="@+id/blurView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -78,6 +78,6 @@

</LinearLayout>

</eightbitlab.com.blurview.BlurView>
</com.maliotis.iosalert.blurview.BlurView>

</LinearLayout>

0 comments on commit 4b30c09

Please sign in to comment.