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
Expand Up @@ -941,10 +941,7 @@ abstract class AndroidXImplPlugin @Inject constructor() : Plugin<Project> {
project.setUpBlankProguardFileForJarIfNeeded(javaExtension)
project.configureJavaCompilationWarnings(androidXExtension)

if (
project.multiplatformExtension == null ||
project.multiplatformExtension!!.hasJavaEnabled()
) {
if (project.multiplatformExtension == null) {
project.configureDependencyVerification(androidXExtension) { taskProvider ->
taskProvider.configure { task ->
task.dependsOn(project.tasks.named(JavaPlugin.COMPILE_JAVA_TASK_NAME))
Expand Down Expand Up @@ -1653,10 +1650,6 @@ internal fun Project.hasAndroidMultiplatformPlugin(): Boolean =
extensions.findByType(AndroidXMultiplatformExtension::class.java)?.hasAndroidMultiplatform()
?: false

@Suppress("DEPRECATION")
internal fun KotlinMultiplatformExtension.hasJavaEnabled(): Boolean =
targets.withType(KotlinJvmTarget::class.java).singleOrNull()?.withJavaEnabled ?: false

internal fun KotlinMultiplatformExtension.hasJvmTarget(): Boolean =
targets.withType(KotlinJvmTarget::class.java).isEmpty().not()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
)
}

@Suppress("DEPRECATION") // Deprecated in Kotlin 2.5
@JvmOverloads
fun androidNativeX86(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("androidNativeX86") {
Expand All @@ -507,6 +508,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
}
}

@Suppress("DEPRECATION") // Deprecated in Kotlin 2.5
@JvmOverloads
fun androidNativeX64(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("androidNativeX64") {
Expand All @@ -518,6 +520,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
}
}

@Suppress("DEPRECATION") // Deprecated in Kotlin 2.5
@JvmOverloads
fun androidNativeArm64(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("androidNativeArm64") {
Expand All @@ -529,6 +532,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
}
}

@Suppress("DEPRECATION") // Deprecated in Kotlin 2.5
@JvmOverloads
fun androidNativeArm32(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("androidNativeArm32") {
Expand Down Expand Up @@ -623,25 +627,13 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
@JvmOverloads
fun watchos(block: Action<KotlinNativeTarget>? = null): List<KotlinNativeTarget> {
return listOfNotNull(
watchosArm32(block),
watchosArm64(block),
// TODO(https://youtrack.jetbrains.com/issue/CMP-9513) publish it
// watchosDeviceArm64()
watchosSimulatorArm64(block),
)
}

@JvmOverloads
fun watchosArm32(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("watchosArm32") {
supportedPlatforms.add(PlatformIdentifier.WATCHOS_ARM_32)
if (project.enableMac()) {
kotlinExtension.watchosArm32 { block?.execute(this) }
} else {
null
}
}

@JvmOverloads
fun watchosArm64(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("watchosArm64") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package org.jetbrains.androidx.build

import androidx.build.AndroidXMultiplatformExtension
import androidx.build.PlatformIdentifier
import androidx.build.configureNode
import androidx.build.configurePinnedKotlinLibraries
import androidx.build.getVersionByName
import androidx.build.multiplatformExtension
Expand Down Expand Up @@ -82,6 +83,9 @@ fun <T: KotlinTarget> AndroidXMultiplatformExtension.configureForkWebTarget(
}
}
}
// Test tasks use the project-level Node.js env spec, so configure it here as well
// as in the root project. Otherwise, KGP's default Node.js version is used.
project.configureNode()
}

val mainCompilation = target.compilations.findByName("main")!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ enum class KotlinTarget(val apiVersion: KotlinVersion, val catalogVersion: Strin
KOTLIN_2_2(KotlinVersion.KOTLIN_2_2, "kotlin22"),
KOTLIN_2_3(KotlinVersion.KOTLIN_2_3, "kotlin23"),
KOTLIN_2_4(KotlinVersion.KOTLIN_2_4, "kotlin24"),
KOTLIN_2_5(KotlinVersion.KOTLIN_2_5, "kotlin25"),
DEFAULT(JETBRAINS_COMPILE_KOTLIN_VERSION),
LATEST(KOTLIN_2_4);
LATEST(KOTLIN_2_5);

constructor(
kotlinTarget: KotlinTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {
TvosArm64("TvOs"),
TvosSimulatorArm64("TvOs"),
WatchosArm64("WatchOs"),
WatchosArm32("WatchOs"),
WatchosSimulatorArm64("WatchOs"),
LinuxX64("Linux"),
LinuxArm64("Linux"),
Expand Down Expand Up @@ -60,7 +59,6 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {

val WATCH_OS = EnumSet.of(
WatchosArm64,
WatchosArm32,
WatchosSimulatorArm64
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package org.jetbrains.androidx.build

import androidx.build.KotlinTarget.KOTLIN_2_2
import androidx.build.KotlinTarget.KOTLIN_2_4
import org.gradle.api.JavaVersion.VERSION_11

val JETBRAINS_MINIMAL_JAVA_VERSION = VERSION_11
val JETBRAINS_COMPILE_KOTLIN_VERSION = KOTLIN_2_2
val JETBRAINS_COMPILE_KOTLIN_VERSION = KOTLIN_2_4
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
)
}

@Suppress("DEPRECATION") // Deprecated in Kotlin 2.5
@JvmOverloads
fun androidNativeX86(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("androidNativeX86") {
Expand All @@ -508,6 +509,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
}
}

@Suppress("DEPRECATION") // Deprecated in Kotlin 2.5
@JvmOverloads
fun androidNativeX64(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("androidNativeX64") {
Expand All @@ -519,6 +521,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
}
}

@Suppress("DEPRECATION") // Deprecated in Kotlin 2.5
@JvmOverloads
fun androidNativeArm64(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("androidNativeArm64") {
Expand All @@ -530,6 +533,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
}
}

@Suppress("DEPRECATION") // Deprecated in Kotlin 2.5
@JvmOverloads
fun androidNativeArm32(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("androidNativeArm32") {
Expand Down Expand Up @@ -624,25 +628,13 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
@JvmOverloads
fun watchos(block: Action<KotlinNativeTarget>? = null): List<KotlinNativeTarget> {
return listOfNotNull(
watchosArm32(block),
watchosArm64(block),
// TODO(https://youtrack.jetbrains.com/issue/CMP-9513) publish it
// watchosDeviceArm64()
watchosSimulatorArm64(block),
)
}

@JvmOverloads
fun watchosArm32(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("watchosArm32") {
supportedPlatforms.add(PlatformIdentifier.WATCHOS_ARM_32)
if (project.enableMac()) {
kotlinExtension.watchosArm32 { block?.execute(this) }
} else {
null
}
}

@JvmOverloads
fun watchosArm64(block: Action<KotlinNativeTarget>? = null): KotlinNativeTarget? =
potentiallyRedirecting("watchosArm64") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ enum class KotlinTarget(val apiVersion: KotlinVersion, val catalogVersion: Strin
KOTLIN_2_2(KotlinVersion.KOTLIN_2_2, "kotlin22"),
KOTLIN_2_3(KotlinVersion.KOTLIN_2_3, "kotlin23"),
KOTLIN_2_4(KotlinVersion.KOTLIN_2_4, "kotlin24"),
KOTLIN_2_5(KotlinVersion.KOTLIN_2_5, "kotlin25"),
DEFAULT(JETBRAINS_COMPILE_KOTLIN_VERSION),
LATEST(KOTLIN_2_4);
LATEST(KOTLIN_2_5);

constructor(
kotlinTarget: KotlinTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {
TvosArm64("TvOs"),
TvosSimulatorArm64("TvOs"),
WatchosArm64("WatchOs"),
WatchosArm32("WatchOs"),
WatchosSimulatorArm64("WatchOs"),
LinuxX64("Linux"),
LinuxArm64("Linux"),
Expand Down Expand Up @@ -60,7 +59,6 @@ enum class ComposePlatforms(vararg val alternativeNames: String) {

val WATCH_OS = EnumSet.of(
WatchosArm64,
WatchosArm32,
WatchosSimulatorArm64
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package org.jetbrains.androidx.build

import androidx.build.KotlinTarget.KOTLIN_2_2
import androidx.build.KotlinTarget.KOTLIN_2_4
import org.gradle.api.JavaVersion.VERSION_11

val JETBRAINS_MINIMAL_JAVA_VERSION = VERSION_11
val JETBRAINS_COMPILE_KOTLIN_VERSION = KOTLIN_2_2
val JETBRAINS_COMPILE_KOTLIN_VERSION = KOTLIN_2_4
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ public final class androidx/compose/animation/core/DeferredTransitionState : and
}

public abstract interface class androidx/compose/animation/core/DurationBasedAnimationSpec : androidx/compose/animation/core/FiniteAnimationSpec {
public synthetic fun vectorize (Landroidx/compose/animation/core/TwoWayConverter;)Landroidx/compose/animation/core/VectorizedAnimationSpec;
public abstract fun vectorize (Landroidx/compose/animation/core/TwoWayConverter;)Landroidx/compose/animation/core/VectorizedDurationBasedAnimationSpec;
public synthetic fun vectorize (Landroidx/compose/animation/core/TwoWayConverter;)Landroidx/compose/animation/core/VectorizedFiniteAnimationSpec;
}

public abstract interface class androidx/compose/animation/core/Easing {
Expand Down Expand Up @@ -356,6 +358,7 @@ public abstract interface annotation class androidx/compose/animation/core/Exper
}

public abstract interface class androidx/compose/animation/core/FiniteAnimationSpec : androidx/compose/animation/core/AnimationSpec {
public synthetic fun vectorize (Landroidx/compose/animation/core/TwoWayConverter;)Landroidx/compose/animation/core/VectorizedAnimationSpec;
public abstract fun vectorize (Landroidx/compose/animation/core/TwoWayConverter;)Landroidx/compose/animation/core/VectorizedFiniteAnimationSpec;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, js, linuxArm64, linuxX64, macosArm64, mingwX64, tvosArm64, tvosSimulatorArm64, wasmJs, watchosArm32, watchosArm64, watchosSimulatorArm64]
// Targets: [iosArm64, iosSimulatorArm64, js, linuxArm64, linuxX64, macosArm64, mingwX64, tvosArm64, tvosSimulatorArm64, wasmJs, watchosArm64, watchosSimulatorArm64]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion compose/runtime/runtime/api/runtime.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, js, linuxArm64, linuxX64, macosArm64, mingwX64, tvosArm64, tvosSimulatorArm64, wasmJs, watchosArm32, watchosArm64, watchosSimulatorArm64]
// Targets: [iosArm64, iosSimulatorArm64, js, linuxArm64, linuxX64, macosArm64, mingwX64, tvosArm64, tvosSimulatorArm64, wasmJs, watchosArm64, watchosSimulatorArm64]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
1 change: 1 addition & 0 deletions compose/ui/ui-graphics/api/desktop/ui-graphics.api
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ public abstract interface class androidx/compose/ui/graphics/PathIterator : java
public abstract fun getTolerance ()F
public abstract fun hasNext ()Z
public abstract fun next ()Landroidx/compose/ui/graphics/PathSegment;
public synthetic fun next ()Ljava/lang/Object;
public abstract fun next ([FI)Landroidx/compose/ui/graphics/PathSegment$Type;
public static synthetic fun next$default (Landroidx/compose/ui/graphics/PathIterator;[FIILjava/lang/Object;)Landroidx/compose/ui/graphics/PathSegment$Type;
}
Expand Down
5 changes: 5 additions & 0 deletions compose/ui/ui-test/api/desktop/ui-test.api
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,11 @@ public final class androidx/compose/ui/test/TrackpadInjectionScopeKt {
public static synthetic fun tripleClick-8c717Hs$default (Landroidx/compose/ui/test/TrackpadInjectionScope;JIILjava/lang/Object;)V
}

public final class androidx/compose/ui/test/platform/SynchronizedObject {
public static final field $stable I
public fun <init> ()V
}

public final class androidx/compose/ui/test/v2/ComposeUiTest_skikoKt {
public static final fun runComposeUiTest (Lkotlin/jvm/functions/Function2;)V
}
Expand Down
10 changes: 10 additions & 0 deletions compose/ui/ui-test/api/ui-test.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,18 @@ final fun androidx.compose.ui.test/isSelected(): androidx.compose.ui.test/Semant
final fun androidx.compose.ui.test/isToggleable(): androidx.compose.ui.test/SemanticsMatcher // androidx.compose.ui.test/isToggleable|isToggleable(){}[0]
final inline fun <#A: kotlin/Any?> androidx.compose.ui.test/wrapAssertionErrorsWithNodeInfo(androidx.compose.ui.test/SemanticsSelector, androidx.compose.ui.semantics/SemanticsNode, kotlin/Function0<#A>): #A // androidx.compose.ui.test/wrapAssertionErrorsWithNodeInfo|wrapAssertionErrorsWithNodeInfo(androidx.compose.ui.test.SemanticsSelector;androidx.compose.ui.semantics.SemanticsNode;kotlin.Function0<0:0>){0§<kotlin.Any?>}[0]

// Targets: [apple]
final class androidx.compose.ui.test.platform/SynchronizedObject : kotlinx.atomicfu.locks/SynchronizedObject { // androidx.compose.ui.test.platform/SynchronizedObject|null[0]
constructor <init>() // androidx.compose.ui.test.platform/SynchronizedObject.<init>|<init>(){}[0]
}

// Targets: [apple]
final fun androidx.compose.ui.test.v2/runComposeUiTest(kotlin.coroutines/SuspendFunction1<androidx.compose.ui.test/ComposeUiTest, kotlin/Unit>) // androidx.compose.ui.test.v2/runComposeUiTest|runComposeUiTest(kotlin.coroutines.SuspendFunction1<androidx.compose.ui.test.ComposeUiTest,kotlin.Unit>){}[0]

// Targets: [js, wasmJs]
final class androidx.compose.ui.test.platform/SynchronizedObject { // androidx.compose.ui.test.platform/SynchronizedObject|null[0]
constructor <init>() // androidx.compose.ui.test.platform/SynchronizedObject.<init>|<init>(){}[0]
}

// Targets: [js, wasmJs]
final fun androidx.compose.ui.test.v2/runComposeUiTest(kotlin.coroutines/SuspendFunction1<androidx.compose.ui.test/ComposeUiTest, kotlin/Unit>): kotlinx.coroutines.test.internal/JsPromiseInterfaceForTesting // androidx.compose.ui.test.v2/runComposeUiTest|runComposeUiTest(kotlin.coroutines.SuspendFunction1<androidx.compose.ui.test.ComposeUiTest,kotlin.Unit>){}[0]
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.InvocationKind
import kotlin.contracts.contract

@PublishedApi
internal actual class SynchronizedObject : kotlinx.atomicfu.locks.SynchronizedObject()

internal actual inline fun makeSynchronizedObject(ref: Any?) = SynchronizedObject()
Expand Down
5 changes: 5 additions & 0 deletions compose/ui/ui-text/api/desktop/ui-text.api
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,11 @@ public final class androidx/compose/ui/text/platform/SynchronizationKt {
public static final fun synchronized (Landroidx/compose/ui/text/platform/SynchronizedObject;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
}

public final class androidx/compose/ui/text/platform/SynchronizedObject {
public static final field $stable I
public fun <init> ()V
}

public final class androidx/compose/ui/text/style/BaselineShift {
public static final field Companion Landroidx/compose/ui/text/style/BaselineShift$Companion;
public static final synthetic fun box-impl (F)Landroidx/compose/ui/text/style/BaselineShift;
Expand Down
10 changes: 10 additions & 0 deletions compose/ui/ui-text/api/ui-text.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,11 @@ final inline fun <#A: kotlin/Any> (androidx.compose.ui.text/AnnotatedString.Buil
final inline fun <#A: kotlin/Any?> androidx.compose.ui.text.platform/synchronized(androidx.compose.ui.text.platform/SynchronizedObject, kotlin/Function0<#A>): #A // androidx.compose.ui.text.platform/synchronized|synchronized(androidx.compose.ui.text.platform.SynchronizedObject;kotlin.Function0<0:0>){0§<kotlin.Any?>}[0]
final inline fun androidx.compose.ui.text/buildAnnotatedString(kotlin/Function1<androidx.compose.ui.text/AnnotatedString.Builder, kotlin/Unit>): androidx.compose.ui.text/AnnotatedString // androidx.compose.ui.text/buildAnnotatedString|buildAnnotatedString(kotlin.Function1<androidx.compose.ui.text.AnnotatedString.Builder,kotlin.Unit>){}[0]

// Targets: [apple]
final class androidx.compose.ui.text.platform/SynchronizedObject : kotlinx.atomicfu.locks/SynchronizedObject { // androidx.compose.ui.text.platform/SynchronizedObject|null[0]
constructor <init>() // androidx.compose.ui.text.platform/SynchronizedObject.<init>|<init>(){}[0]
}

// Targets: [apple]
final fun (platform.Foundation/NSLocale).androidx.compose.ui.text.intl/toComposeLocale(): androidx.compose.ui.text.intl/Locale // androidx.compose.ui.text.intl/toComposeLocale|toComposeLocale@platform.Foundation.NSLocale(){}[0]

Expand All @@ -2061,3 +2066,8 @@ final val androidx.compose.ui.text.input/androidx_compose_ui_text_input_Platform

// Targets: [ios]
final fun androidx.compose.ui.text.input/androidx_compose_ui_text_input_PlatformImeOptionsConfiguration$stableprop_getter(): kotlin/Int // androidx.compose.ui.text.input/androidx_compose_ui_text_input_PlatformImeOptionsConfiguration$stableprop_getter|androidx_compose_ui_text_input_PlatformImeOptionsConfiguration$stableprop_getter(){}[0]

// Targets: [js, wasmJs]
final class androidx.compose.ui.text.platform/SynchronizedObject { // androidx.compose.ui.text.platform/SynchronizedObject|null[0]
constructor <init>() // androidx.compose.ui.text.platform/SynchronizedObject.<init>|<init>(){}[0]
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import kotlin.contracts.InvocationKind
import kotlin.contracts.contract
import kotlin.jvm.JvmName

@PublishedApi
internal actual class SynchronizedObject : kotlinx.atomicfu.locks.SynchronizedObject()

@Suppress("NOTHING_TO_INLINE")
Expand Down
7 changes: 7 additions & 0 deletions compose/ui/ui/api/desktop/ui.api
Original file line number Diff line number Diff line change
Expand Up @@ -3987,6 +3987,11 @@ public final class androidx/compose/ui/platform/SynchronizationKt {
public static final fun synchronized (Landroidx/compose/ui/platform/SynchronizedObject;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
}

public final class androidx/compose/ui/platform/SynchronizedObject {
public static final field $stable I
public fun <init> ()V
}

public abstract interface class androidx/compose/ui/platform/TaskDispatchers {
public abstract fun getDefault ()Lkotlinx/coroutines/CoroutineDispatcher;
public abstract fun getIO ()Lkotlinx/coroutines/CoroutineDispatcher;
Expand Down Expand Up @@ -4654,6 +4659,7 @@ public final class androidx/compose/ui/window/DialogState_desktopKt {

public abstract interface class androidx/compose/ui/window/DialogWindowScope : androidx/compose/ui/window/WindowScope {
public abstract fun getWindow ()Landroidx/compose/ui/awt/ComposeDialog;
public synthetic fun getWindow ()Ljava/awt/Window;
}

public final class androidx/compose/ui/window/Dialog_desktopKt {
Expand All @@ -4670,6 +4676,7 @@ public final class androidx/compose/ui/window/Dialog_skikoKt {

public abstract interface class androidx/compose/ui/window/FrameWindowScope : androidx/compose/ui/window/WindowScope {
public abstract fun getWindow ()Landroidx/compose/ui/awt/ComposeWindow;
public synthetic fun getWindow ()Ljava/awt/Window;
}

public final class androidx/compose/ui/window/MenuBarScope {
Expand Down
Loading
Loading