Skip to content

Commit

Permalink
Bump several dependencies to the latest version (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico authored Oct 23, 2020
1 parent fca28dd commit e1185de
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 56 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
buildscript {
ext.kotlin_version = "1.3.72"
ext.kotlin_version = "1.4.10"
repositories {
gradlePluginPortal()
jcenter()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'org.jlleitschuh.gradle:ktlint-gradle:9.2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath 'org.jlleitschuh.gradle:ktlint-gradle:9.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
12 changes: 6 additions & 6 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ android {
dependencies {
implementation project(':slidetoact')

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'

testImplementation "junit:junit:4.12"
testImplementation "junit:junit:4.13.1"

androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions slidetoact/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android {
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

Expand Down Expand Up @@ -107,7 +107,7 @@ bintray {
}

ktlint {
version = "0.37.0"
version = "0.39.0"
debug = false
verbose = true
android = true
Expand Down
100 changes: 57 additions & 43 deletions slidetoact/src/main/java/com/ncorti/slidetoact/SlideToActView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ class SlideToActView @JvmOverloads constructor(

val attrs: TypedArray = context.theme.obtainStyledAttributes(
xmlAttrs,
R.styleable.SlideToActView, defStyleAttr, R.style.SlideToActView
R.styleable.SlideToActView,
defStyleAttr,
R.style.SlideToActView
)
try {
mDesiredSliderHeight = TypedValue.applyDimension(
Expand All @@ -307,10 +309,12 @@ class SlideToActView @JvmOverloads constructor(
).toInt()

val defaultOuter = ContextCompat.getColor(
this.context, R.color.slidetoact_defaultAccent
this.context,
R.color.slidetoact_defaultAccent
)
val defaultWhite = ContextCompat.getColor(
this.context, R.color.slidetoact_white
this.context,
R.color.slidetoact_white
)

with(attrs) {
Expand Down Expand Up @@ -348,13 +352,16 @@ class SlideToActView @JvmOverloads constructor(
isReversed = getBoolean(R.styleable.SlideToActView_slider_reversed, false)
isRotateIcon = getBoolean(R.styleable.SlideToActView_rotate_icon, true)
isAnimateCompletion = getBoolean(
R.styleable.SlideToActView_animate_completion, true
R.styleable.SlideToActView_animate_completion,
true
)
animDuration = getInteger(
R.styleable.SlideToActView_animation_duration, 300
R.styleable.SlideToActView_animation_duration,
300
).toLong()
bumpVibration = getInt(
R.styleable.SlideToActView_bump_vibration, 0
R.styleable.SlideToActView_bump_vibration,
0
).toLong()

mOriginAreaMargin = getDimensionPixelSize(
Expand All @@ -364,7 +371,8 @@ class SlideToActView @JvmOverloads constructor(
mActualAreaMargin = mOriginAreaMargin

sliderIcon = getResourceId(
R.styleable.SlideToActView_slider_icon, R.drawable.slidetoact_ic_arrow
R.styleable.SlideToActView_slider_icon,
R.drawable.slidetoact_ic_arrow
)

// For icon color. check if the `slide_icon_color` is set.
Expand Down Expand Up @@ -657,7 +665,8 @@ class SlideToActView @JvmOverloads constructor(

// Animator that bounce away the cursors
val marginAnimator = ValueAnimator.ofInt(
mActualAreaMargin, (mInnerRect.width() / 2).toInt() + mActualAreaMargin
mActualAreaMargin,
(mInnerRect.width() / 2).toInt() + mActualAreaMargin
)
marginAnimator.addUpdateListener {
mActualAreaMargin = it.animatedValue as Int
Expand Down Expand Up @@ -699,27 +708,30 @@ class SlideToActView @JvmOverloads constructor(

animSet.duration = animDuration

animSet.addListener(object : Animator.AnimatorListener {
override fun onAnimationStart(p0: Animator?) {
onSlideToActAnimationEventListener?.onSlideCompleteAnimationStarted(
this@SlideToActView, mPositionPerc
)
}
animSet.addListener(
object : Animator.AnimatorListener {
override fun onAnimationStart(p0: Animator?) {
onSlideToActAnimationEventListener?.onSlideCompleteAnimationStarted(
this@SlideToActView,
mPositionPerc
)
}

override fun onAnimationCancel(p0: Animator?) {
}
override fun onAnimationCancel(p0: Animator?) {
}

override fun onAnimationEnd(p0: Animator?) {
mIsCompleted = true
onSlideToActAnimationEventListener?.onSlideCompleteAnimationEnded(
this@SlideToActView
)
onSlideCompleteListener?.onSlideComplete(this@SlideToActView)
}
override fun onAnimationEnd(p0: Animator?) {
mIsCompleted = true
onSlideToActAnimationEventListener?.onSlideCompleteAnimationEnded(
this@SlideToActView
)
onSlideCompleteListener?.onSlideComplete(this@SlideToActView)
}

override fun onAnimationRepeat(p0: Animator?) {
override fun onAnimationRepeat(p0: Animator?) {
}
}
})
)
animSet.start()
}

Expand Down Expand Up @@ -812,28 +824,30 @@ class SlideToActView @JvmOverloads constructor(

animSet.duration = animDuration

animSet.addListener(object : Animator.AnimatorListener {
override fun onAnimationStart(p0: Animator?) {
onSlideToActAnimationEventListener?.onSlideResetAnimationStarted(
this@SlideToActView
)
}
animSet.addListener(
object : Animator.AnimatorListener {
override fun onAnimationStart(p0: Animator?) {
onSlideToActAnimationEventListener?.onSlideResetAnimationStarted(
this@SlideToActView
)
}

override fun onAnimationCancel(p0: Animator?) {
}
override fun onAnimationCancel(p0: Animator?) {
}

override fun onAnimationEnd(p0: Animator?) {
isEnabled = true
stopIconAnimation(mDrawableTick)
onSlideToActAnimationEventListener?.onSlideResetAnimationEnded(
this@SlideToActView
)
onSlideResetListener?.onSlideReset(this@SlideToActView)
}
override fun onAnimationEnd(p0: Animator?) {
isEnabled = true
stopIconAnimation(mDrawableTick)
onSlideToActAnimationEventListener?.onSlideResetAnimationEnded(
this@SlideToActView
)
onSlideResetListener?.onSlideReset(this@SlideToActView)
}

override fun onAnimationRepeat(p0: Animator?) {
override fun onAnimationRepeat(p0: Animator?) {
}
}
})
)
animSet.start()
}

Expand Down

0 comments on commit e1185de

Please sign in to comment.