Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade kotlin back to 1.9.25 #276

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion dpadrecyclerview-compose/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.carioca.allure)
alias(libs.plugins.maven.publish)
id 'org.jetbrains.dokka'
Expand Down Expand Up @@ -41,6 +40,14 @@ android {
jvmTarget = '1.8'
}

buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get()
}

}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ import kotlinx.coroutines.launch
* and triggers a sound effect on click.
* Workaround for: https://issuetracker.google.com/issues/268268856
*/
@Suppress("UnnecessaryVariable")
@Composable
fun Modifier.dpadClickable(
enabled: Boolean = true,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
onLongClick: (() -> Unit)? = null,
onClick: (() -> Unit)?,
): Modifier {
val clickLambda = onClick
val longClickLambda = onLongClick
val context = LocalContext.current
val audioManager = remember { context.getSystemService(Context.AUDIO_SERVICE) as? AudioManager }
return handleDpadCenter(
Expand All @@ -92,16 +95,16 @@ fun Modifier.dpadClickable(
}
).focusable(interactionSource = interactionSource)
.semantics(mergeDescendants = true) {
onClick {
onClick?.let { action ->
onClick(label = null) {
clickLambda?.let { action ->
audioManager?.playSoundEffect(AudioManager.FX_KEY_CLICK)
action()
return@onClick true
}
false
}
onLongClick {
onLongClick?.let { action ->
longClickLambda?.let { action ->
action()
return@onLongClick true
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ androidx-appcompat = "1.7.0"
androidx-compose-ui = "1.7.0-rc01"
androidx-test-espresso = '3.6.1'
androidx-test-uiautomator = '2.3.0'
androidx-compose-compiler = '1.5.15'
# From sample
androidx-compose-material3 = '1.2.1'
androidx-constraintlayout = "2.1.4"
Expand All @@ -28,7 +29,7 @@ guava = "33.1.0-android"
timber = "5.0.1"

decorator = "2.1.0"
kotlin = "2.0.0"
kotlin = "1.9.25"
kover = "0.7.6"
jacoco = "0.8.11"
test-junit = '4.13.2'
Expand All @@ -42,7 +43,6 @@ android-application = { id = "com.android.application", version.ref = "android-g
android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" }
androidx-navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "androidx-navigation" }
jacoco = { id = "org.jacoco.core", version.ref = "jacoco" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
carioca-allure = { id = "com.rubensousa.carioca.report.allure", version.ref = "carioca-allure" }
Expand Down
9 changes: 8 additions & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.androidx.navigation.safeargs)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.carioca.allure)
}

Expand Down Expand Up @@ -40,6 +39,14 @@ android {
buildFeatures {
viewBinding true
}

buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get()
}
}

dependencies {
Expand Down
Loading