Skip to content

Commit f6ebdd5

Browse files
authored
Merge pull request #2265 from DimensionDev/dependency/kotlin-2.4
update kotlin 2.4
2 parents a7f020a + 44088b1 commit f6ebdd5

47 files changed

Lines changed: 128 additions & 264 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,3 @@ kotlin {
245245
}
246246
}
247247

248-
ktorfit {
249-
compilerPluginVersion.set("2.3.4")
250-
}

app/src/main/java/dev/dimension/flare/ui/component/RssRichText.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,7 @@ private fun RichTextScope.RenderNode(
482482
context.builder.append(node.text())
483483
}
484484

485-
else -> {
486-
Unit
487-
}
485+
else -> {}
488486
}
489487
}
490488

app/src/main/java/dev/dimension/flare/ui/screen/compose/DraftBoxScreen.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ private fun DraftBoxItem(
149149
enabled = item.status != UiDraftStatus.SENDING,
150150
leadingContent = {
151151
when (item.status) {
152-
UiDraftStatus.DRAFT -> {
153-
Unit
154-
}
152+
UiDraftStatus.DRAFT -> {}
155153

156154
UiDraftStatus.FAILED -> {
157155
FAIcon(

app/src/main/java/dev/dimension/flare/ui/screen/media/StatusMediaScreen.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,13 +1513,9 @@ private fun mediaViewerPresenter(
15131513

15141514
fun shareMedia(data: UiMedia) {
15151515
when (data) {
1516-
is UiMedia.Audio -> {
1517-
Unit
1518-
}
1516+
is UiMedia.Audio -> {}
15191517

1520-
is UiMedia.Gif -> {
1521-
Unit
1522-
}
1518+
is UiMedia.Gif -> {}
15231519

15241520
is UiMedia.Image -> {
15251521
scope.launch {
@@ -1531,9 +1527,7 @@ private fun mediaViewerPresenter(
15311527
}
15321528
}
15331529

1534-
is UiMedia.Video -> {
1535-
Unit
1536-
}
1530+
is UiMedia.Video -> {}
15371531
}
15381532
}
15391533

app/src/main/java/dev/dimension/flare/ui/screen/settings/AiConfigScreen.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,9 +1104,7 @@ internal fun TranslationConfigScreen(onBack: () -> Unit) {
11041104
)
11051105
}
11061106

1107-
TranslateProviderOption.GoogleWeb -> {
1108-
Unit
1109-
}
1107+
TranslateProviderOption.GoogleWeb -> {}
11101108
}
11111109
}
11121110
}

build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111

1212
dependencies {
1313
compileOnly("com.android.tools.build:gradle:9.2.1")
14-
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.21")
14+
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:2.4.0")
1515
implementation("org.jlleitschuh.gradle:ktlint-gradle:14.2.0")
1616
}
1717

build-logic/src/main/kotlin/dev/dimension/flare/buildlogic/FlareConventionSupport.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ enum class FlarePlatform {
2929
}
3030

3131
class FlareMultiplatformLibraryPlugin : Plugin<Project> {
32-
override fun apply(target: Project) = Unit
32+
override fun apply(target: Project) {}
3333
}
3434

3535
class FlareAndroidApplicationPlugin : Plugin<Project> {
@@ -56,6 +56,9 @@ class FlareRootConventionsPlugin : Plugin<Project> {
5656
}
5757
}
5858
}
59+
subproject.tasks.matching { it.name.startsWith("runKtlint") }.configureEach {
60+
dependsOn(subproject.tasks.matching { it.name.startsWith("ksp") })
61+
}
5962
}
6063
}
6164
}

compose-ui/src/commonMain/kotlin/dev/dimension/flare/ui/component/ProfileHeader.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,7 @@ private fun ProfileHeaderSuccess(
162162
isMe.onSuccess {
163163
if (!it) {
164164
when (followButtonState) {
165-
is UiState.Error -> {
166-
Unit
167-
}
165+
is UiState.Error -> {}
168166

169167
is UiState.Loading -> {
170168
PlatformFilledTonalButton(
@@ -382,9 +380,7 @@ private fun ProfileHeaderSuccess(
382380
}
383381
}
384382

385-
null -> {
386-
Unit
387-
}
383+
null -> {}
388384
}
389385
MatricesDisplay(
390386
data = user.matrices,

compose-ui/src/commonMain/kotlin/dev/dimension/flare/ui/component/status/CommonStatusComponent.kt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,7 @@ internal fun TranslationDisplayBadge(
707707
)
708708
}
709709

710-
TranslationDisplayState.Translated -> {
711-
Unit
712-
}
710+
TranslationDisplayState.Translated -> {}
713711

714712
TranslationDisplayState.Failed -> {
715713
FAIcon(
@@ -720,9 +718,7 @@ internal fun TranslationDisplayBadge(
720718
)
721719
}
722720

723-
TranslationDisplayState.Hidden -> {
724-
Unit
725-
}
721+
TranslationDisplayState.Hidden -> {}
726722
}
727723
}
728724
}
@@ -942,9 +938,7 @@ internal fun StatusActions(
942938
}
943939

944940
// nested group is not supported
945-
is ActionMenu.Group -> {
946-
Unit
947-
}
941+
is ActionMenu.Group -> {}
948942

949943
ActionMenu.Divider -> {
950944
PlatformDropdownMenuDivider()
@@ -979,9 +973,7 @@ internal fun StatusActions(
979973
}
980974

981975
// divider is only supported in group
982-
ActionMenu.Divider -> {
983-
Unit
984-
}
976+
ActionMenu.Divider -> {}
985977
}
986978
}
987979
}

compose-ui/src/commonMain/kotlin/dev/dimension/flare/ui/component/status/UiTimelineComponent.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,7 @@ private fun UserContent(
384384
)
385385
}
386386

387-
else -> {
388-
Unit
389-
}
387+
else -> {}
390388
}
391389
}
392390
}

0 commit comments

Comments
 (0)