Skip to content

Commit ccda85a

Browse files
committed
Add stubs for referenced projects in androidMain
1 parent 2338d0d commit ccda85a

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

mpp/stub-project/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This project exists to stub Android projects that are not used in the fork-mode development,
2+
but defined as dependencies of `androidMain`

mpp/stub-project/build.gradle

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright 2026 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import androidx.build.PlatformIdentifier
18+
import androidx.build.SoftwareType
19+
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
20+
21+
plugins {
22+
id("AndroidXPlugin")
23+
}
24+
25+
androidXMultiplatform {
26+
androidLibrary {
27+
namespace = "stub-project"
28+
}
29+
30+
defaultPlatform(PlatformIdentifier.ANDROID)
31+
}

settings.gradle

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ def includeProject(String name, filePath, List<BuildType> filter = []) {
399399
projectDependencyGraph.addToAllProjects(name, file)
400400
}
401401

402+
// TODO(https://youtrack.jetbrains.com/issue/CMP-9524/Support-the-same-setup-for-integration-and-jb-main-branches)
403+
// ideally this list should be same as in AOSP, but there should be another mode or a root project that loads projects
404+
// needed only for the fork
405+
402406
// Stubbed projects:
403407
// see /mpp/docs/Stubbed Projects.md
404408
includeProject(":annotation:annotation", "annotation/annotation-compatibility-stub")
@@ -552,6 +556,39 @@ includeBuild("placeholder")
552556

553557
includeProject(":mpp")
554558

559+
// stubs needed for android source sets (Android currently doesn't work in the fork)
560+
includeProject(":test:screenshot:screenshot", "mpp/stub-project")
561+
includeProject(":lifecycle:lifecycle-livedata-core", "mpp/stub-project")
562+
includeProject(":lifecycle:lifecycle-common-java8", "mpp/stub-project")
563+
includeProject(":lifecycle:lifecycle-viewmodel-compose-lint", "mpp/stub-project")
564+
includeProject(":lifecycle:lifecycle-viewmodel-compose:lifecycle-viewmodel-compose-samples", "mpp/stub-project")
565+
includeProject(":lint-checks:integration-tests", "mpp/stub-project")
566+
includeProject(":savedstate:savedstate-ktx", "mpp/stub-project")
567+
includeProject(":navigation:navigation-common-lint", "mpp/stub-project")
568+
includeProject(":navigation:navigation-compose-lint", "mpp/stub-project")
569+
includeProject(":navigation:navigation-compose:navigation-compose-samples", "mpp/stub-project")
570+
includeProject(":navigation:navigation-runtime-lint", "mpp/stub-project")
571+
includeProject(":navigation3:navigation3-ui:navigation3-ui-samples", "mpp/stub-project")
572+
includeProject(":navigationevent:navigationevent-samples", "mpp/stub-project")
573+
includeProject(":constraintlayout:constraintlayout-compose", "mpp/stub-project")
574+
includeProject(":compose:material:material:integration-tests:material-demos", "mpp/stub-project")
575+
includeProject(":compose:material3:material3:integration-tests:material3-demos", "mpp/stub-project")
576+
includeProject(":navigation:navigation-compose:integration-tests:navigation-demos", "mpp/stub-project")
577+
includeProject(":navigation3:navigation3-ui:integration-tests:navigation3-demos", "mpp/stub-project")
578+
includeProject(":paging:paging-compose:integration-tests", "mpp/stub-project")
579+
includeProject(":paging:paging-compose:integration-tests:paging-demos", "mpp/stub-project")
580+
includeProject(":paging:paging-compose", "mpp/stub-project")
581+
includeProject(":activity:activity", "mpp/stub-project")
582+
includeProject(":activity:activity-compose", "mpp/stub-project")
583+
includeProject(":compose:integration-tests:demos", "mpp/stub-project")
584+
includeProject(":compose:material:material:integration-tests:material-catalog", "mpp/stub-project")
585+
includeProject(":compose:material3:material3:integration-tests:material3-catalog", "mpp/stub-project")
586+
includeProject(":compose:material:material-navigation-samples", "mpp/stub-project")
587+
includeProject(":window:window-testing", "mpp/stub-project")
588+
includeProject(":compose:material3:material3-adaptive-navigation-suite:material3-adaptive-navigation-suite-samples", "mpp/stub-project")
589+
includeProject(":compose:ui:ui-text-lint", "mpp/stub-project")
590+
includeProject(":compose:material3:adaptive:adaptive-samples", "mpp/stub-project")
591+
555592
// ---------------------------------------------------------------------
556593
// --- there should be no includeProject additions after this line -----
557594
// ---------------------------------------------------------------------

0 commit comments

Comments
 (0)