diff --git a/library/build.gradle b/library/build.gradle index 9b27c56..a48430d 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -23,9 +23,30 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) -// androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { -// exclude group: 'com.android.support', module: 'support-annotations' -// }) compile 'com.android.support:appcompat-v7:25.1.0' testCompile 'junit:junit:4.12' } + +// build a jar with source files +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +task javadoc(type: Javadoc) { + failOnError false + source = android.sourceSets.main.java.sourceFiles + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + classpath += configurations.compile +} + +// build a jar with javadoc +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} diff --git a/library/src/main/java/com/mancj/slideup/SlideUp.java b/library/src/main/java/com/mancj/slideup/SlideUp.java index 46b1adf..1a2343b 100644 --- a/library/src/main/java/com/mancj/slideup/SlideUp.java +++ b/library/src/main/java/com/mancj/slideup/SlideUp.java @@ -100,7 +100,7 @@ public State[] newArray(int size) { public interface Listener { /** - * @param percent percents of complete slide (100 = HIDDEN, 0 = SHOWED) + * @param percent percents of complete slide (100 = HIDDEN, 0 = SHOWED) * */ void onSlide(float percent); @@ -143,7 +143,7 @@ public Builder(@NonNull T sliderView){ /** *

Define a start state on screen

* - * @param startState (default - {@link State#HIDDEN}) + * @param startState (default - {@link State#HIDDEN}) * */ public Builder withStartState(@NonNull State startState){ this.startState = startState; @@ -153,7 +153,7 @@ public Builder withStartState(@NonNull State startState){ /** *

Define a start gravity, this parameter affects the motion vector slider

* - * @param gravity (default - {@link android.view.Gravity#BOTTOM}) + * @param gravity (default - {@link android.view.Gravity#BOTTOM}) * */ public Builder withStartGravity(@StartVector int gravity){ startGravity = gravity; @@ -184,7 +184,7 @@ public Builder withListeners(@NonNull Listener... listeners){ /** *

Turning on/off debug logging for all handled events

* - * @param enabled (default - false) + * @param enabled (default - false) * */ public Builder withLoggingEnabled(boolean enabled){ debug = enabled; @@ -194,7 +194,7 @@ public Builder withLoggingEnabled(boolean enabled){ /** *

Define duration of animation (when you using {@link #hide()} or {@link #show()} methods)

* - * @param duration (default - 300) + * @param duration (default - 300) * */ public Builder withAutoSlideDuration(int duration){ autoSlideDuration = duration; @@ -204,7 +204,7 @@ public Builder withAutoSlideDuration(int duration){ /** *

Define touchable area (in dp) for interaction

* - * @param area (default - 300dp) + * @param area (default - 300dp) * */ public Builder withTouchableArea(float area){ touchableArea = area * density; @@ -214,7 +214,7 @@ public Builder withTouchableArea(float area){ /** *

Turning on/off sliding on touch event

* - * @param enabled (default - true) + * @param enabled (default - true) * */ public Builder withGesturesEnabled(boolean enabled){ gesturesEnabled = enabled; @@ -223,7 +223,7 @@ public Builder withGesturesEnabled(boolean enabled){ /** *

- * WARNING: + * WARNING: * If you want to restore saved parameters, place this method at the end of builder *

* @param savedState parameters will be restored from this bundle, if it contains them @@ -262,7 +262,7 @@ private SlideUp(Builder builder){ density = builder.density; touchableArea = builder.touchableArea; autoSlideDuration = builder.autoSlideDuration; - debug = BuildConfig.DEBUG && builder.debug; + debug = builder.debug; isRTL = builder.isRTL; gesturesEnabled = builder.gesturesEnabled; init(); @@ -338,7 +338,7 @@ public T getSliderView() { /** *

Set duration of animation (when you using {@link #hide()} or {@link #show()} methods)

* - * @param autoSlideDuration (default - 300) + * @param autoSlideDuration (default - 300) * */ public void setAutoSlideDuration(int autoSlideDuration) { this.autoSlideDuration = autoSlideDuration; @@ -354,7 +354,7 @@ public float getAutoSlideDuration(){ /** *

Set touchable area (in dp) for interaction

* - * @param touchableArea (default - 300dp) + * @param touchableArea (default - 300dp) * */ public void setTouchableArea(float touchableArea) { this.touchableArea = touchableArea * density; @@ -407,10 +407,10 @@ public void showImmediately() { /** *

Turning on/off debug logging

* - * @param enabled (default - false) + * @param enabled (default - false) * */ public void setLoggingEnabled(boolean enabled){ - debug = BuildConfig.DEBUG && enabled; + debug = enabled; } /** @@ -423,7 +423,7 @@ public boolean isLoggingEnabled(){ /** *

Turning on/off gestures

* - * @param enabled (default - true) + * @param enabled (default - true) * */ public void setGesturesEnabled(boolean enabled) { this.gesturesEnabled = gesturesEnabled;