Use Anvil KSP instead of the Square KAPT one (#3564)
* Use Anvil KSP instead of the Square KAPT one * Fix several configuration cache, lint and test issues * Allow incremental kotlin compilation in the CI * Workaround Robolectric + Compose issue that caused `AppNotIdleException` * Update the `enterprise` commit hash * Update screenshots --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
5fcc80a383
commit
4a43fcb69a
54 changed files with 463 additions and 348 deletions
|
|
@ -8,7 +8,7 @@
|
|||
package io.element.android.libraries.designsystem.component.async
|
||||
|
||||
import androidx.compose.animation.core.Transition
|
||||
import androidx.compose.animation.core.updateTransition
|
||||
import androidx.compose.animation.core.rememberTransition
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.SideEffect
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
|
|
@ -237,7 +237,7 @@ class AsyncIndicatorTest {
|
|||
val coroutineScope = rememberCoroutineScope()
|
||||
val transition = state.currentItem.value?.let {
|
||||
// If there is an item, update its transition state to simulate an animation
|
||||
updateTransition(state.currentAnimationState, label = "")
|
||||
rememberTransition(state.currentAnimationState, label = "")
|
||||
}
|
||||
if (state.currentAnimationState.hasEntered() && state.currentItem.value?.durationMs != null) {
|
||||
SideEffect {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import extension.setupAnvil
|
||||
|
||||
/*
|
||||
* Copyright 2023, 2024 New Vector Ltd.
|
||||
*
|
||||
|
|
@ -7,16 +9,17 @@
|
|||
|
||||
plugins {
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.anvil)
|
||||
}
|
||||
|
||||
setupAnvil()
|
||||
|
||||
android {
|
||||
namespace = "io.element.android.libraries.mediapickers.impl"
|
||||
|
||||
dependencies {
|
||||
implementation(projects.libraries.core)
|
||||
implementation(projects.libraries.di)
|
||||
implementation(libs.inject)
|
||||
api(projects.libraries.mediapickers.api)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(projects.libraries.core)
|
||||
implementation(projects.libraries.di)
|
||||
implementation(libs.inject)
|
||||
api(projects.libraries.mediapickers.api)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import extension.setupAnvil
|
||||
import org.gradle.internal.extensions.stdlib.capitalized
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
/*
|
||||
* Copyright 2023, 2024 New Vector Ltd.
|
||||
|
|
@ -51,3 +53,15 @@ sqldelight {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround for KSP not picking up the generated files from SqlDelight
|
||||
androidComponents {
|
||||
onVariants(selector().all()) { variant ->
|
||||
afterEvaluate {
|
||||
val variantName = variant.name.capitalized()
|
||||
tasks.getByName<KotlinCompile>("ksp${variantName}Kotlin") {
|
||||
setSource(tasks.getByName("generate${variantName}SessionDatabaseInterface").outputs)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue