diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1345043..72836b2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -agp = "8.5.2" +agp = "8.7.2" cardview = "1.0.0" constraintlayout = "2.1.4" dotsindicator = "5.1.0" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b4817f9..607b415 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Mar 10 20:33:42 CET 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/viewpagerdotsindicator-sample/build.gradle.kts b/viewpagerdotsindicator-sample/build.gradle.kts index 9b6f9b3..50017a9 100644 --- a/viewpagerdotsindicator-sample/build.gradle.kts +++ b/viewpagerdotsindicator-sample/build.gradle.kts @@ -35,7 +35,7 @@ android { } kotlin { - jvmToolchain(17) + jvmToolchain(21) } dependencies { @@ -49,8 +49,8 @@ dependencies { androidTestImplementation(libs.androidx.runner) androidTestImplementation(libs.androidx.espresso.core) - implementation(project(":viewpagerdotsindicator")) -// implementation(libs.dotsindicator) +// implementation(project(":viewpagerdotsindicator")) + implementation(libs.dotsindicator) implementation(platform(libs.androidx.compose.bom)) implementation(libs.androidx.ui) diff --git a/viewpagerdotsindicator/build.gradle.kts b/viewpagerdotsindicator/build.gradle.kts index 93e93ef..e481b06 100644 --- a/viewpagerdotsindicator/build.gradle.kts +++ b/viewpagerdotsindicator/build.gradle.kts @@ -30,7 +30,7 @@ android { } kotlin { - jvmToolchain(17) + jvmToolchain(21) } dependencies { diff --git a/viewpagerdotsindicator/src/main/kotlin/com/tbuonomo/viewpagerdotsindicator/DotsIndicator.kt b/viewpagerdotsindicator/src/main/kotlin/com/tbuonomo/viewpagerdotsindicator/DotsIndicator.kt index 63e3e8f..8cbbff3 100644 --- a/viewpagerdotsindicator/src/main/kotlin/com/tbuonomo/viewpagerdotsindicator/DotsIndicator.kt +++ b/viewpagerdotsindicator/src/main/kotlin/com/tbuonomo/viewpagerdotsindicator/DotsIndicator.kt @@ -135,8 +135,8 @@ class DotsIndicator @JvmOverloads constructor( (dotsSize + dotsSize * (dotsWidthFactor - 1) * positionOffset).toInt() nextDot.setWidth(nextDotWidth) - val selectedDotBackground = selectedDot.background as DotsGradientDrawable - val nextDotBackground = nextDot.background as DotsGradientDrawable + val selectedDotBackground = selectedDot.background as DotsGradientDrawable? + val nextDotBackground = nextDot.background as DotsGradientDrawable? if (selectedDotColor != dotsColor) { val selectedColor = argbEvaluator.evaluate( @@ -148,12 +148,12 @@ class DotsIndicator @JvmOverloads constructor( selectedDotColor ) as Int - nextDotBackground.setColor(nextColor) + nextDotBackground?.setColor(nextColor) if (progressMode && selectedPosition <= pager!!.currentItem) { - selectedDotBackground.setColor(selectedDotColor) + selectedDotBackground?.setColor(selectedDotColor) } else { - selectedDotBackground.setColor(selectedColor) + selectedDotBackground?.setColor(selectedColor) } } }