Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
915af0e
Replace gradle wrapper to regular public distribution
MatkovIvan Oct 1, 2025
1bd5d22
Do not require offline structure from repo-tool checkout
MatkovIvan Oct 1, 2025
20346a0
no-repo. exclude projects
igordmn Dec 16, 2025
5254cb6
no-repo. fix android compilation
igordmn Dec 17, 2025
c8e626c
Fix Version.isSnapshot()
igordmn Dec 16, 2025
eaf024b
Fix run configuration
igordmn Dec 16, 2025
74d6028
Introduce sample_font_fork.ttf
igordmn Dec 16, 2025
81e403e
Update binaryCompatibilityValidator
igordmn Dec 16, 2025
e7d27d2
Remove unused code
igordmn Dec 16, 2025
ad524db
Remove redundant dependencies
igordmn Dec 16, 2025
9ebd9b5
API dump
igordmn Dec 16, 2025
c1da39d
Fix buildDir for iOS instrumented tests
igordmn Dec 16, 2025
919aa90
Fix navigation-compose iOS compilation
igordmn Dec 16, 2025
6851bf8
Restore watchos/tvos publication
igordmn Dec 16, 2025
b351786
Set Java compatibility to 11 for Android and Desktop
igordmn Dec 17, 2025
382d2eb
Fix Web
igordmn Dec 16, 2025
f8f6259
Fix Desktop
igordmn Dec 16, 2025
e47f385
Fix :lifecycle:lifecycle-runtime:compileTestKotlinWasmJs
igordmn Dec 16, 2025
9e3a8e3
Fix lifecycle-viewmodel-navigation3
igordmn Dec 16, 2025
8768cca
Restore fork gradle properties
igordmn Dec 16, 2025
93be6e4
Replace AndroidDebug/AndroidRelease by Android
igordmn Dec 16, 2025
4bf1ab5
Fix publishing tasks
igordmn Dec 16, 2025
8166825
Fix extensions
igordmn Dec 16, 2025
8e5b954
Fix publication WIP
igordmn Dec 16, 2025
66f4673
Load `compatibility-stub` projects instead of original ones
MatkovIvan Dec 16, 2025
5b1b97c
Update build scripts in stub projects
MatkovIvan Dec 16, 2025
c2ca1ba
Uncomment JetBrainsPublication for stub projects
MatkovIvan Dec 16, 2025
dedd0c5
Update build scripts in stub projects
igordmn Dec 17, 2025
fec8b31
Remove runtime-retain project
igordmn Dec 17, 2025
be0860e
Remove :compose:runtime:runtime-annotation project
igordmn Dec 17, 2025
3cf0710
Restore dependencies to jb-main state
igordmn Dec 19, 2025
75a418f
Disable buildSrc tasks
igordmn Dec 19, 2025
6ef383d
Fix Android redirection
igordmn Dec 19, 2025
f767dc1
Fix :compose:ui:ui-uikit error because of parallel execution
igordmn Dec 19, 2025
580d181
introduce GRADLE_WEB_TESTS_FLAGS
eymar Jan 9, 2026
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
21 changes: 13 additions & 8 deletions .github/workflows/compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ on:
branches:
- jb-main

env:
# TODO: https://youtrack.jetbrains.com/issue/CMP-9497/Investgate-CfW-tests-flakiness-with-enabled-gradle-configuration-cache-on-CI
# Web Tests require running additional processes: karma in node, browser;
# To reduce the memory pressure, we change some defaults:
GRADLE_WEB_TESTS_FLAGS: >-
--no-daemon --stacktrace --no-parallel --no-configuration-cache
-Dorg.gradle.jvmargs="-Xmx8g -XX:+UseParallelGC"
-Porg.gradle.workers.max=1

jobs:
compose-desktop-tests:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -203,8 +212,7 @@ jobs:
# Compile tests as a separate step to reduce memory usage and potential OOM during running tests.
- name: Compile ${{ matrix.task }} Tests
run: |
./gradlew compileTestKotlin${{ matrix.task }} \
--no-daemon --stacktrace
./gradlew compileTestKotlin${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }}

- name: Setup Google Chrome
uses: browser-actions/setup-chrome@v2
Expand All @@ -220,8 +228,7 @@ jobs:

- name: Run Web Chrome Tests
run: |
./gradlew :mpp:testWeb${{ matrix.task }} \
--no-daemon --stacktrace --no-parallel \
./gradlew :mpp:testWeb${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }} \
-Pjetbrains.androidx.web.tests.enableFirefox=false \
-Pjetbrains.androidx.web.tests.enableChrome=true

Expand Down Expand Up @@ -250,8 +257,7 @@ jobs:
# Compile tests as a separate step to reduce memory usage and potential OOM during running tests.
- name: Compile ${{ matrix.task }} Tests
run: |
./gradlew compileTestKotlin${{ matrix.task }} \
--no-daemon --stacktrace
./gradlew compileTestKotlin${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }}

- name: Setup Missing Packages
run: |
Expand All @@ -270,8 +276,7 @@ jobs:

- name: Run Web Firefox Tests
run: |
./gradlew :mpp:testWeb${{ matrix.task }} \
--no-daemon --stacktrace --no-parallel \
./gradlew :mpp:testWeb${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }} \
-Pjetbrains.androidx.web.tests.enableFirefox=true \
-Pjetbrains.androidx.web.tests.enableChrome=false

Expand Down
4 changes: 2 additions & 2 deletions .run/desktop/test.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</option>
<option name="taskNames">
<list>
<option value="desktopTest -Pandroidx.ignoreTestFailures" />
<option value="desktopTest" />
</list>
</option>
<option name="vmOptions" />
Expand All @@ -21,4 +21,4 @@
<RunAsTest>true</RunAsTest>
<method v="2" />
</configuration>
</component>
</component>
42 changes: 13 additions & 29 deletions annotation/annotation-compatibility-stub/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,29 @@
* limitations under the License.
*/

import androidx.build.AndroidXComposePlugin
import androidx.build.LibraryType
import org.jetbrains.androidx.build.JetBrainsAndroidXPlugin
import androidx.build.PlatformIdentifier
import androidx.build.SoftwareType

plugins {
id("AndroidXPlugin")

// TODO move all functionality to Compose-independent plugin (`collection` shouldn't depend on Compose concepts)
id("AndroidXComposePlugin")
id("JetBrainsAndroidXPlugin")
}

AndroidXComposePlugin.applyAndConfigureKotlinPlugin(project)
JetBrainsAndroidXPlugin.applyAndConfigure(project)

androidXComposeMultiplatform {
androidXMultiplatform {
ios()
js()
wasm()
darwin()
linux()
}

kotlin {
jvm()
// Not all modules can have these targets, so declare them here instead of androidXComposeMultiplatform.
// We can support the kotlin-native targets supported by kotlin coroutines:
// https://github.com/Kotlin/kotlinx.coroutines/blob/master/gradle/compile-native-multiplatform.gradle
// NOTE: Keep this list in sync with runtime-saveable's targets.
linux()
mac()
mingwX64()
tvos()
wasmJs()
watchosArm64()
watchosArm32()
watchosX64()
watchosSimulatorArm64()
tvosArm64()
tvosX64()
tvosSimulatorArm64()
mingwX64()

defaultPlatform(PlatformIdentifier.JVM)

sourceSets {
commonMain {
Expand All @@ -63,11 +50,8 @@ kotlin {

androidx {
name = "Annotation"
type = LibraryType.PUBLISHED_LIBRARY
type = SoftwareType.PUBLISHED_LIBRARY
mavenVersion = LibraryVersions.ANNOTATION
inceptionYear = "2013"
description = "Provides source annotations for tooling and readability."
}

androidxCompose {
composeCompilerPluginEnabled = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,4 @@ class JetBrainsAndroidXPlugin : Plugin<Project> {
)
)
}

companion object {

@Suppress("UNUSED_PARAMETER")
@JvmStatic
fun applyAndConfigure(
project: Project
) {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ abstract class AndroidXImplPlugin @Inject constructor() : Plugin<Project> {
it.configureWithAndroidXExtension(androidXExtension)
}
project.configureConstraintsWithinGroup(androidXExtension)
project.validateProjectParser(androidXExtension)
if (!org.jetbrains.androidx.build.isJetBrainsForkStructureEnabled(project)) project.validateProjectParser(androidXExtension)
project.validateAllArchiveInputsRecognized()
project.afterEvaluate {
if (androidXExtension.shouldPublishSbom()) {
Expand Down Expand Up @@ -544,7 +544,7 @@ abstract class AndroidXImplPlugin @Inject constructor() : Plugin<Project> {
}
}
project.configureKmp()
project.configureSourceJarForMultiplatform()
@Suppress("ConstantConditionIf") if (false) project.configureSourceJarForMultiplatform() // the fork has different logic

// Disable any source JAR task(s) added by KotlinMultiplatformPlugin.
// https://youtrack.jetbrains.com/issue/KT-55881
Expand Down Expand Up @@ -734,7 +734,7 @@ abstract class AndroidXImplPlugin @Inject constructor() : Plugin<Project> {
androidXExtension,
)
project.configurePublicResourcesStub(variant)
project.configureMultiplatformSourcesForAndroid(androidXExtension.samplesProjects)
@Suppress("ConstantConditionIf") if (false) project.configureMultiplatformSourcesForAndroid(androidXExtension.samplesProjects) // the fork has different logic
}

project.configureVersionFileWriter(project.multiplatformExtension!!, androidXExtension)
Expand Down Expand Up @@ -928,7 +928,7 @@ abstract class AndroidXImplPlugin @Inject constructor() : Plugin<Project> {
)
}
if (variant.name == DEFAULT_PUBLISH_CONFIG) {
project.configureSourceJarForAndroid(variant, androidXExtension.samplesProjects)
@Suppress("ConstantConditionIf") if (false) project.configureSourceJarForAndroid(variant, androidXExtension.samplesProjects) // the fork has different logic
project.configurePublicResourcesStub(variant)
project.configureDependencyVerification(androidXExtension) { taskProvider ->
taskProvider.configure { task -> task.dependsOn("compileReleaseJavaWithJavac") }
Expand Down Expand Up @@ -985,7 +985,7 @@ abstract class AndroidXImplPlugin @Inject constructor() : Plugin<Project> {
!project.plugins.hasPlugin(KotlinBasePluginWrapper::class.java) ||
!project.plugins.hasPlugin(KotlinBaseApiPlugin::class.java)
) {
project.configureSourceJarForJava(androidXExtension.samplesProjects)
@Suppress("ConstantConditionIf") if (false) project.configureSourceJarForJava(androidXExtension.samplesProjects) // the fork has different logic
}
}

Expand Down Expand Up @@ -1059,8 +1059,9 @@ abstract class AndroidXImplPlugin @Inject constructor() : Plugin<Project> {
throw IllegalArgumentException("Unexpected extension: $this")
}
compileOptions.apply {
sourceCompatibility = VERSION_1_8
targetCompatibility = VERSION_1_8
// All fork Android libraries should target Java 11
sourceCompatibility = VERSION_11
targetCompatibility = VERSION_11
}

val defaultMinSdk = project.defaultAndroidConfig.minSdk
Expand Down Expand Up @@ -1455,19 +1456,14 @@ abstract class AndroidXImplPlugin @Inject constructor() : Plugin<Project> {
}
}

@Suppress("unused")
internal fun getDefaultTargetJavaVersion(
softwareType: SoftwareType,
projectName: String? = null,
targetName: String? = null,
): JavaVersion {
return when {
// TODO(b/353328300): Move room-compiler-processing to Java 17 once Dagger is ready.
projectName != null && projectName.contains("room3-compiler-processing") -> VERSION_11
projectName != null && projectName.contains("desktop") -> VERSION_11
targetName != null && (targetName == "desktop" || targetName == "jvmStubs") -> VERSION_11
softwareType.compilationTarget == CompilationTarget.HOST -> VERSION_17
else -> VERSION_1_8
}
// All fork libraries (Android and Desktop) should target Java 11
return VERSION_11
}

/** Must be called from a `project.afterEvaluate` block. */
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 @@ -34,10 +34,13 @@ import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.configuration.BuildFeatures
import org.gradle.api.plugins.ExtensionAware
import org.gradle.api.tasks.Copy
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.testing.Test
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.the
import org.gradle.kotlin.dsl.withType
import org.jetbrains.androidx.build.configureForkWebTarget
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
Expand Down Expand Up @@ -65,6 +68,7 @@ import org.jetbrains.kotlin.gradle.targets.wasm.yarn.WasmYarnPlugin
import org.jetbrains.kotlin.gradle.targets.wasm.yarn.WasmYarnRootEnvSpec
import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
import org.jetbrains.kotlin.konan.target.LinkerOutputKind
import org.tomlj.Toml

/**
* [AndroidXMultiplatformExtension] is an extension that wraps specific functionality of the Kotlin
Expand Down Expand Up @@ -705,7 +709,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {

@JvmOverloads
fun js(block: Action<KotlinJsTargetDsl>? = null): KotlinJsTargetDsl? =
project.configureWebTarget(
configureForkWebTarget(
platform = PlatformIdentifier.JS,
isEnabled = project.enableJs(),
createTarget = { configure -> kotlinExtension.js(configure) },
Expand All @@ -715,7 +719,7 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
@OptIn(ExperimentalWasmDsl::class)
@JvmOverloads
fun wasmJs(block: Action<KotlinJsTargetDsl>? = null): KotlinWasmTargetDsl? =
project.configureWebTarget(
configureForkWebTarget(
platform = PlatformIdentifier.WASM_JS,
isEnabled = project.enableWasmJs(),
createTarget = { configure -> kotlinExtension.wasmJs(configure) },
Expand Down Expand Up @@ -768,6 +772,18 @@ abstract class AndroidXMultiplatformExtension(val project: Project) {
companion object {
const val EXTENSION_NAME = "androidXMultiplatform"
}

// FORK-only public extensions

/**
* Configures native compilation tasks with flags to link required frameworks
*/
fun configureDarwinFlags() = org.jetbrains.androidx.build.configureDarwinFlags(project)

/**
* Configure instrumented tests to run on an actual iOS simulator.
*/
fun iosInstrumentedTest() = org.jetbrains.androidx.build.addIosInstrumentedTestSourceset(project)
}

// TODO(https://youtrack.jetbrains.com/issue/KT-76874/):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,6 @@ import org.jetbrains.kotlin.konan.target.PlatformManager
abstract class KonanBuildService @Inject constructor(private val execOperations: ExecOperations) :
BuildService<KonanBuildService.Parameters> {
private val dist by lazy {
// double check that we don't initialize konan distribution without prebuilts in AOSP
check(
parameters.projectLayoutType.get() == ProjectLayoutType.PLAYGROUND ||
parameters.prebuilts.isPresent
) {
"""
Prebuilts directory for Konan must be provided when the project is not a playground
project.
"""
.trimIndent()
}
KonanPrebuiltsSetup.createKonanDistribution(
prebuiltsDirectory = parameters.prebuilts.orNull?.asFile,
konanHome = parameters.konanHome.get().asFile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ abstract class StudioTask : DefaultTask() {
when (ProjectLayoutType.from(this)) {
ProjectLayoutType.ANDROIDX -> RootStudioTask::class.java
ProjectLayoutType.PLAYGROUND -> PlaygroundStudioTask::class.java

// For JetBrains' fork it's supposed to use IJ IDEA, so it's not required to have a task
// to automatically download and run Android Studio.
ProjectLayoutType.JETBRAINS_FORK -> return
}
tasks.register(STUDIO_TASK, studioTask)
}
Expand Down
Loading