Skip to content

Commit e035a3a

Browse files
committed
fix: resolve CI build failures (JitPack 403 & Compose coords)
- Replaced external EasingInterpolator dependency with local QuartOutInterpolator to fix JitPack 403 - Fixed incorrect Compose dependency group IDs - Adopted Compose BOM for reliable versioning - Updated app module minSdkVersion to 21 to match library Compose requirements - Fixed syntax errors and orphaned imports in Kotlin migration
1 parent 1fd032e commit e035a3a

5 files changed

Lines changed: 28 additions & 15 deletions

File tree

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212

1313
defaultConfig {
1414
applicationId "com.sackcentury.shinebutton"
15-
minSdkVersion 14
15+
minSdkVersion 21
1616
targetSdkVersion 34
1717
versionCode 1
1818
versionName "1.0"

shinebuttonlib/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ dependencies {
4343
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.7.20"
4444
testImplementation 'junit:junit:4.13.2'
4545
implementation 'androidx.appcompat:appcompat:1.6.1'
46-
implementation 'com.github.MasayukiSuda:EasingInterpolator:v1.3.2'
4746

4847
// Compose dependencies
49-
def compose_version = '1.3.3'
50-
implementation "androidx.compose.ui:compose-ui:$compose_version"
51-
implementation "androidx.compose.material:compose-material:$compose_version"
52-
implementation "androidx.compose.ui:compose-ui-tooling-preview:$compose_version"
53-
implementation "androidx.compose.runtime:compose-runtime:$compose_version"
54-
implementation "androidx.compose.animation:compose-animation:$compose_version"
48+
def composeBom = platform('androidx.compose:compose-bom:2023.01.00')
49+
implementation composeBom
50+
implementation 'androidx.compose.ui:ui'
51+
implementation 'androidx.compose.material:material'
52+
implementation 'androidx.compose.ui:ui-tooling-preview'
53+
implementation 'androidx.compose.runtime:runtime'
54+
implementation 'androidx.compose.animation:animation'
5555
}
5656

5757
//apply from: '../gradle-mvn-push.gradle'

shinebuttonlib/src/main/java/com/sackcentury/shinebuttonlib/ShineAnimator.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ package com.sackcentury.shinebuttonlib
22

33
import android.animation.ValueAnimator
44
import android.graphics.Canvas
5-
import com.daasuu.ei.Ease
6-
import com.daasuu.ei.EasingInterpolator
5+
import com.sackcentury.shinebuttonlib.interpolator.QuartOutInterpolator
76

87
/**
98
* ShineAnimator handles the value animation for the shine effect particles.
@@ -21,7 +20,7 @@ class ShineAnimator : ValueAnimator {
2120
setFloatValues(1f, maxValue)
2221
duration = animDuration
2322
startDelay = 200
24-
interpolator = EasingInterpolator(Ease.QUART_OUT)
23+
interpolator = QuartOutInterpolator()
2524
}
2625

2726
constructor(durationMs: Long, maxValue: Float, delay: Long) {
@@ -30,7 +29,7 @@ class ShineAnimator : ValueAnimator {
3029
setFloatValues(1f, maxValue)
3130
duration = durationMs
3231
startDelay = delay
33-
interpolator = EasingInterpolator(Ease.QUART_OUT)
32+
interpolator = QuartOutInterpolator()
3433
}
3534

3635
fun startAnim() {

shinebuttonlib/src/main/java/com/sackcentury/shinebuttonlib/ShineView.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import android.graphics.RectF
1010
import android.util.AttributeSet
1111
import android.view.View
1212
import android.view.ViewGroup
13-
import com.daasuu.ei.Ease
14-
import com.daasuu.ei.EasingInterpolator
13+
import com.sackcentury.shinebuttonlib.interpolator.QuartOutInterpolator
1514
import com.sackcentury.shinebuttonlib.listener.SimpleAnimatorListener
1615
import java.util.*
1716

@@ -124,7 +123,7 @@ class ShineView : View {
124123
// Click splash animation (expanding circle)
125124
clickAnimator = ValueAnimator.ofFloat(0f, 1.1f).apply {
126125
duration = clickAnimDuration
127-
interpolator = EasingInterpolator(Ease.QUART_OUT)
126+
interpolator = QuartOutInterpolator()
128127
addUpdateListener { valueAnimator ->
129128
clickValue = valueAnimator.animatedValue as Float
130129
invalidate()
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.sackcentury.shinebuttonlib.interpolator
2+
3+
import android.view.animation.Interpolator
4+
import kotlin.math.pow
5+
6+
/**
7+
* A local implementation of the QuartOut easing function to remove the dependency
8+
* on the external EasingInterpolator library which was causing JitPack 403 errors.
9+
*/
10+
class QuartOutInterpolator : Interpolator {
11+
override fun getInterpolation(input: Float): Float {
12+
val t = input - 1f
13+
return -(t.pow(3) * t - 1f)
14+
}
15+
}

0 commit comments

Comments
 (0)