Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -706,7 +706,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {

@JvmOverloads
fun linux(block: Action<KotlinNativeTarget>? = null): List<KotlinNativeTarget> {
return listOfNotNull(linuxArm64(block), linuxX64(block))
return listOfNotNull(linuxX64(block))
}

@JvmOverloads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,9 @@ fun addIosInstrumentedTestSourceset(project: Project) {
isStatic = true
}
}
testableTargets.getByName(
"iosSimulatorArm64",
KotlinNativeTargetWithSimulatorTests::class,
KotlinNativeTargetWithSimulatorTests::configureTestRun
)
val iosSimulatorArm64 = testableTargets.findByName("iosSimulatorArm64")
if (iosSimulatorArm64 is KotlinNativeTargetWithSimulatorTests) {
iosSimulatorArm64.configureTestRun()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {
val GENERATE_KLIB = WEB + LINUX_NATIVE + WINDOWS_NATIVE + DARWIN

val SKIKO_SUPPORT =
EnumSet.of(KotlinMultiplatform) + JVM_BASED + IOS + MACOS_NATIVE + WEB
EnumSet.of(KotlinMultiplatform) + JVM_BASED + IOS + MACOS_NATIVE + WEB + LinuxX64

val ALL = EnumSet.allOf(ComposePlatforms::class.java)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -706,7 +706,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {

@JvmOverloads
fun linux(block: Action<KotlinNativeTarget>? = null): List<KotlinNativeTarget> {
return listOfNotNull(linuxArm64(block), linuxX64(block))
return listOfNotNull(linuxX64(block))
}

@JvmOverloads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,9 @@ fun addIosInstrumentedTestSourceset(project: Project) {
isStatic = true
}
}
testableTargets.getByName(
"iosSimulatorArm64",
KotlinNativeTargetWithSimulatorTests::class,
KotlinNativeTargetWithSimulatorTests::configureTestRun
)
val iosSimulatorArm64 = testableTargets.findByName("iosSimulatorArm64")
if (iosSimulatorArm64 is KotlinNativeTargetWithSimulatorTests) {
iosSimulatorArm64.configureTestRun()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {
val GENERATE_KLIB = WEB + LINUX_NATIVE + WINDOWS_NATIVE + DARWIN

val SKIKO_SUPPORT =
EnumSet.of(KotlinMultiplatform) + JVM_BASED + IOS + MACOS_NATIVE + WEB
EnumSet.of(KotlinMultiplatform) + JVM_BASED + IOS + MACOS_NATIVE + WEB + LinuxX64

val ALL = EnumSet.allOf(ComposePlatforms::class.java)

Expand Down
1 change: 1 addition & 0 deletions compose/animation/animation-core/build-fork.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ androidXMultiplatform {
}
desktop()
mac()
linux()
ios()
js()
wasmJs()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.compose.animation.core

import kotlin.native.concurrent.ThreadLocal

@ThreadLocal
private val threadObject = Any()

internal actual fun getCurrentThread(): Any = threadObject
1 change: 1 addition & 0 deletions compose/animation/animation/build-fork.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ androidXMultiplatform {
}
desktop()
mac()
linux()
ios()
js()
wasmJs()
Expand Down
1 change: 1 addition & 0 deletions compose/foundation/foundation-layout/build-fork.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ androidXMultiplatform {
}
desktop()
mac()
linux()
ios()
js()
wasmJs()
Expand Down
1 change: 1 addition & 0 deletions compose/foundation/foundation/build-fork.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ androidXMultiplatform {
}
desktop()
mac()
linux()
ios()
js()
wasmJs()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.compose.foundation

import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalAccessorScope

internal actual val TapIndicationDelay: Long = 0L

@Composable
internal actual fun rememberPlatformOverscrollEffect(): OverscrollEffect? = null

internal actual fun CompositionLocalAccessorScope.defaultOverscrollFactory(): OverscrollFactory? = null

internal actual fun isRequestFocusOnClickEnabled(): Boolean = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.compose.foundation.gestures

import androidx.compose.animation.SplineBasedFloatDecayAnimationSpec
import androidx.compose.animation.core.generateDecayAnimationSpec
import androidx.compose.animation.rememberSplineBasedDecay
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.input.pointer.PointerEvent
import androidx.compose.ui.node.CompositionLocalConsumerModifierNode
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.fastFold

internal actual fun platformScrollableDefaultFlingBehavior(): ScrollableDefaultFlingBehavior =
DefaultFlingBehavior(
SplineBasedFloatDecayAnimationSpec(UnityDensity).generateDecayAnimationSpec()
)

@Composable
internal actual fun rememberPlatformDefaultFlingBehavior(): FlingBehavior {
val flingSpec = rememberSplineBasedDecay<Float>()
return remember(flingSpec) {
DefaultFlingBehavior(flingSpec)
}
}

internal actual fun CompositionLocalConsumerModifierNode.platformScrollConfig(): ScrollConfig =
LinuxScrollConfig

private object LinuxScrollConfig : ScrollConfig {
override fun Density.calculateMouseWheelScroll(event: PointerEvent, bounds: IntSize): Offset {
return event.changes.fastFold(Offset.Zero) { acc, c -> acc + c.scrollDelta } * -64.dp.toPx()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

@file:OptIn(ExperimentalComposeUiApi::class)

package androidx.compose.foundation.internal

import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.platform.ClipEntry
import androidx.compose.ui.platform.NativeClipboard
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.platform.Clipboard

internal actual suspend fun ClipEntry.readText(): String? = getPlainText()

internal actual suspend fun ClipEntry.readAnnotatedString(): AnnotatedString? {
val text = getPlainText() ?: return null
return AnnotatedString(text)
}

internal actual fun AnnotatedString?.toClipEntry(): ClipEntry? {
if (this == null) return null
return ClipEntry.withPlainText(this.text)
}

internal actual fun ClipEntry?.hasText(): Boolean = this?.getPlainText() != null

internal actual fun Clipboard.isReadSupported(): Boolean = true
internal actual fun Clipboard.isWriteSupported(): Boolean = true

internal fun NativeClipboard.hasText(): Boolean {
return true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.compose.foundation.lazy

import androidx.compose.runtime.Composable

@Composable
internal actual fun defaultLazyListBeyondBoundsItemCount(): Int = 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.compose.foundation.text

import androidx.compose.foundation.text.input.internal.selection.TextFieldSelectionState
import androidx.compose.foundation.text.selection.SelectionManager
import androidx.compose.foundation.text.selection.TextFieldSelectionManager
import androidx.compose.runtime.Composable

@Composable
internal actual fun ContextMenuArea(
manager: TextFieldSelectionManager,
content: @Composable () -> Unit
) = CommonContextMenuArea(manager, content)

@Composable
internal actual fun ContextMenuArea(
selectionState: TextFieldSelectionState,
enabled: Boolean,
content: @Composable () -> Unit
) = CommonContextMenuArea(selectionState, enabled, content)

@Composable
internal actual fun ContextMenuArea(
manager: SelectionManager,
content: @Composable () -> Unit
) = CommonContextMenuArea(manager, content)
Loading