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
46 changes: 46 additions & 0 deletions compose/runtime/runtime-annotation/build-fork.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (C) 2025 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.
*/

/**
* This file was created using the `createProject` gradle task (./gradlew createProject)
*
* Please use the task when creating a new project, rather than copying an existing project and
* modifying its settings.
*/

import androidx.build.SoftwareType
import androidx.build.PlatformIdentifier

plugins {
id("AndroidXPlugin")
}

androidXMultiplatform {
androidLibrary {
namespace = "androidx.compose.runtime.annotation"
}
jvm()
mac()
linux()
mingwX64()
ios()
watchos()
tvos()
js()
wasmJs()

defaultPlatform(PlatformIdentifier.JVM)
}
62 changes: 62 additions & 0 deletions compose/runtime/runtime-stub/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright 2019 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.
*/

/**
* This file was created using the `createProject` gradle task (./gradlew createProject)
*
* Please use the task when creating a new project, rather than copying an existing project and
* modifying its settings.
*/

import androidx.build.SoftwareType
import androidx.build.PlatformIdentifier
import com.android.build.api.dsl.KotlinMultiplatformAndroidHostTestCompilation

plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
id("JetBrainsAndroidXPlugin")
}

androidXMultiplatform {
redirect("androidx.compose.runtime") {
androidLibrary {
namespace = "org.jetbrains.compose.runtime"
compilations.withType(KotlinMultiplatformAndroidHostTestCompilation) {
it.returnDefaultValues = true
}
}
desktop()
mingwX64()
linux()
mac()
ios()
tvos()
watchos()
js()
wasmJs()
}

defaultPlatform(PlatformIdentifier.ANDROID)

}

androidx {
name = "Compose Runtime"
type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
inceptionYear = "2019"
description = "Tree composition support for code generated by the Compose compiler plugin and corresponding public API"
}
99 changes: 76 additions & 23 deletions compose/runtime/runtime/build-fork.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,95 @@
* modifying its settings.
*/

import androidx.build.SoftwareType
import androidx.build.PlatformIdentifier
import com.android.build.api.dsl.KotlinMultiplatformAndroidHostTestCompilation

plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
id("JetBrainsAndroidXPlugin")
}

androidXMultiplatform {
redirect("androidx.compose.runtime") {
androidLibrary {
namespace = "org.jetbrains.compose.runtime"
compilations.withType(KotlinMultiplatformAndroidHostTestCompilation) {
it.returnDefaultValues = true
}
androidLibrary {
namespace = "androidx.compose.runtime"
compilations.withType(KotlinMultiplatformAndroidHostTestCompilation) {
it.returnDefaultValues = true
}
desktop()
mingwX64()
linux()
mac()
ios()
tvos()
watchos()
js()
wasmJs()
}
desktop()
mingwX64()
linux()
mac()
ios()
tvos()
watchos()
js()
wasmJs()

defaultPlatform(PlatformIdentifier.ANDROID)

}
sourceSets {
commonMain.dependencies {
api(libs.kotlinCoroutinesCore)
api("androidx.compose.runtime:runtime-annotation:1.11.3")
implementation("androidx.collection:collection:1.5.0")
}

commonTest.dependencies {
implementation(libs.kotlinTest)
implementation(libs.kotlinCoroutinesTest)
implementation(libs.kotlinReflect)
implementation(project(":compose:runtime:runtime-test-utils"))
}

create("nonEmulatorCommonTest").dependsOn(commonTest)
create("nonEmulatorJvmTest").dependsOn(nonEmulatorCommonTest)

androidMain.dependencies {
api(libs.kotlinCoroutinesAndroid)
api("androidx.annotation:annotation-experimental:1.4.1")
}

androidDeviceTest.dependencies {
implementation(libs.testExtJunit)
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.espressoCore)
implementation(libs.truth)
}

androidHostTest.dependsOn(nonEmulatorJvmTest)

create("nonAndroidMain").dependsOn(commonMain)
create("nonAndroidTest").dependsOn(commonTest)

desktopMain.dependsOn(nonAndroidMain)

androidx {
name = "Compose Runtime"
type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
inceptionYear = "2019"
description = "Tree composition support for code generated by the Compose compiler plugin and corresponding public API"
desktopTest {
dependsOn(nonEmulatorJvmTest)
dependsOn(nonAndroidTest)
}

nonJvmMain {
dependsOn(nonAndroidMain)
dependencies {
implementation(libs.atomicFu)
}
}

nativeMain.dependsOn(nonAndroidMain)

nativeTest {
dependsOn(nonAndroidTest)
dependsOn(nonEmulatorCommonTest)
}

webTest.dependsOn(nonEmulatorCommonTest)

wasmJsMain.dependencies {
implementation(libs.kotlinXw3c)
}
}
}

group = "androidx.compose.runtime"
107 changes: 91 additions & 16 deletions compose/runtime/runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,114 @@
import androidx.build.SoftwareType
import androidx.build.PlatformIdentifier
import com.android.build.api.dsl.KotlinMultiplatformAndroidHostTestCompilation
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
id("JetBrainsAndroidXPlugin")
}

androidXMultiplatform {
redirect("androidx.compose.runtime") {
androidLibrary {
namespace = "org.jetbrains.compose.runtime"
compilations.withType(KotlinMultiplatformAndroidHostTestCompilation) {
it.returnDefaultValues = true
}
androidLibrary {
namespace = "androidx.compose.runtime"
compilations.withType(KotlinMultiplatformAndroidHostTestCompilation) {
it.returnDefaultValues = true
}
desktop()
mingwX64()
linux()
mac()
ios()
tvos()
watchos()
js()
wasmJs()
}
desktop()
mingwX64()
linux()
mac()
ios()
tvos()
watchos()
js()
wasmJs()

defaultPlatform(PlatformIdentifier.ANDROID)

sourceSets {
commonMain.dependencies {
api(libs.kotlinCoroutinesCore)
api(project(":compose:runtime:runtime-annotation"))
implementation("androidx.collection:collection:1.5.0")
}

commonTest.dependencies {
implementation(libs.kotlinTest)
implementation(libs.kotlinCoroutinesTest)
implementation(libs.kotlinReflect)
implementation(project(":compose:runtime:runtime-test-utils"))
}

create("nonEmulatorCommonTest").dependsOn(commonTest)
create("nonEmulatorJvmTest").dependsOn(nonEmulatorCommonTest)

androidMain.dependencies {
api(libs.kotlinCoroutinesAndroid)
api("androidx.annotation:annotation-experimental:1.4.1")
}

androidDeviceTest.dependencies {
implementation(libs.testExtJunit)
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.espressoCore)
implementation(libs.truth)
}

androidHostTest.dependsOn(nonEmulatorJvmTest)

create("nonAndroidMain").dependsOn(commonMain)
create("nonAndroidTest").dependsOn(commonTest)

desktopMain.dependsOn(nonAndroidMain)

desktopTest {
dependsOn(nonEmulatorJvmTest)
dependsOn(nonAndroidTest)
}

nonJvmMain {
dependsOn(nonAndroidMain)
dependencies {
implementation(libs.atomicFu)
}
}

nativeMain.dependsOn(nonAndroidMain)

nativeTest {
dependsOn(nonAndroidTest)
dependsOn(nonEmulatorCommonTest)
}

webTest.dependsOn(nonEmulatorCommonTest)

wasmJsMain.dependencies {
implementation(libs.kotlinXw3c)
}
}
}

dependencies {
lintChecks(project(":compose:runtime:runtime-lint"))
lintPublish(project(":compose:runtime:runtime-lint"))

constraints {
// Prevents symbols duplication with old versions of JetBrains' fork.
// Starting with version 1.9.0, this module is published as empty artifact
// with dependency to this androidx module.
commonMainImplementation("org.jetbrains.compose.runtime:runtime:1.9.0") {
because "prevents symbols duplication"
}
}
}

androidx {
name = "Compose Runtime"
type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
inceptionYear = "2019"
description = "Tree composition support for code generated by the Compose compiler plugin and corresponding public API"
samples(project(":compose:runtime:runtime:runtime-samples"))
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ kapt.use.k2=true

# JetBrains fork only properties

jetbrains.androidx.use.androidx.sources.instead.of.artifacts=true

# jetbrains-fork in jb-main branch
androidx.studio.type=jetbrains-fork

Expand Down
Loading
Loading