-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
93 lines (90 loc) · 4.24 KB
/
Copy pathsettings.gradle.kts
File metadata and controls
93 lines (90 loc) · 4.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@file:Suppress("UnstableApiUsage")
// `includeBuild("build-logic")` makes ALL plugins registered in `build-logic/` available
// to projects in this build. The plugins include:
//
// - `trailblaze.bundle` — per-trailmap TS bindings
// - `trailblaze.bundled-config` — flat-target generation from trailmaps
// - `trailblaze.spotless` — formatting
// - `trailblaze.multi-simulator`— iOS sim provisioning
//
// No active module applies plugins beyond what it needs.
pluginManagement {
// `build-logic/` lives next to this settings file (alongside `gradle/`,
// `trailblaze-*/`, etc.) so it travels with the rest of this directory.
// Downstream builds that wrap this tree pick the same plugins up via their own
// `includeBuild` pointing at this `build-logic/`.
includeBuild("build-logic")
// The publishable `xyz.block.trailblaze.android-gradle` plugin (JUnit-shell codegen and, via its
// nested `trailmap { }` block, scripted-tool bundling — folded from two separate plugin ids into
// one) lives in its own OSS module so external Android teams can consume it from Maven Central.
// Composite-build include here makes the plugin id resolvable to in-tree apply-sites without
// going through mavenLocal/snapshot republish on every change.
includeBuild("trailblaze-android-gradle")
// Repository URLs are resolved by name rather than written as literals here, so this file
// pins no specific registry host. The public Maven URLs in `gradle.properties` (`mavenRepo*`)
// are the defaults; a build may redirect resolution to a private mirror by exporting the
// matching `TRAILBLAZE_GRADLE_REPO_*` environment variable, without editing this file and
// without that host ever appearing in this tree. `mavenRepo` prefers the env var, then the
// Gradle property; a blank value from either is treated as unset (an exported-but-empty env var
// would otherwise become an invalid `uri("")`), and a clear error is raised if neither provides
// one. It is a block-local lambda because Gradle evaluates `pluginManagement {}` in isolation
// and can't see top-level helpers.
val mavenRepo = { envVar: String, propKey: String ->
(providers.environmentVariable(envVar).orNull?.takeIf(String::isNotBlank)
?: providers.gradleProperty(propKey).orNull?.takeIf(String::isNotBlank))
?: error("Set the $envVar environment variable or the $propKey Gradle property to a Maven repository URL")
}
repositories {
maven { url = uri(mavenRepo("TRAILBLAZE_GRADLE_REPO_ANDROID", "mavenRepoAndroid")) }
maven { url = uri(mavenRepo("TRAILBLAZE_GRADLE_REPO_GOOGLE", "mavenRepoGoogle")) }
maven { url = uri(mavenRepo("TRAILBLAZE_GRADLE_REPO_PLUGINS", "mavenRepoPlugins")) }
}
}
dependencyResolutionManagement {
val mavenRepo = { envVar: String, propKey: String ->
(providers.environmentVariable(envVar).orNull?.takeIf(String::isNotBlank)
?: providers.gradleProperty(propKey).orNull?.takeIf(String::isNotBlank))
?: error("Set the $envVar environment variable or the $propKey Gradle property to a Maven repository URL")
}
repositories {
maven { url = uri(mavenRepo("TRAILBLAZE_GRADLE_REPO_ANDROID", "mavenRepoAndroid")) }
maven { url = uri(mavenRepo("TRAILBLAZE_GRADLE_REPO_GOOGLE", "mavenRepoGoogle")) }
}
}
rootProject.name = "trailblaze"
include(
":docs:generator",
":examples",
":examples:android-sample-app",
":examples:android-sample-app-uitests",
":examples:compose-desktop",
":examples:ios-contacts",
":examples:playwright-electron",
":examples:playwright-native",
":examples:wikipedia",
":trailblaze-accessibility-app",
":trailblaze-agent",
":trailblaze-android",
":trailblaze-android-ondevice-mcp",
":trailblaze-capture",
":trailblaze-common",
":trailblaze-compose-target",
":trailblaze-desktop",
":trailblaze-host",
":trailblaze-models",
":trailblaze-ondevice-rpc-proto",
":trailblaze-trailmap-bundler",
":trailblaze-compose",
":trailblaze-playwright",
":trailblaze-quickjs-tools",
":trailblaze-revyl",
":trailblaze-scripting-bundle",
":trailblaze-scripting-fetch",
":trailblaze-scripting-mcp-common",
":trailblaze-scripting-subprocess",
":trailblaze-selector-engine-js",
":trailblaze-ui",
":trailblaze-report",
":trailblaze-server",
":trailblaze-tracing",
)