forked from elide-dev/elide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
204 lines (178 loc) · 5.25 KB
/
settings.gradle.kts
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/*
* Copyright (c) 2023 Elide Ventures, LLC.
*
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://opensource.org/license/mit/
*
* 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.
*/
@file:Suppress(
"UnstableApiUsage",
)
import build.less.plugin.settings.buildless
pluginManagement {
repositories {
maven("https://gradle.pkg.st/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://elide-snapshots.storage-download.googleapis.com/repository/v3/")
gradlePluginPortal()
google()
mavenCentral()
}
includeBuild("tools/plugin/gradle-plugin")
}
plugins {
id("build.less") version("1.0.0-beta1")
id("com.gradle.enterprise") version("3.15")
id("org.gradle.toolchains.foojay-resolver-convention") version("0.7.0")
id("com.gradle.common-custom-user-data-gradle-plugin") version("1.11.1")
}
// Fix: Force CWD to proper value and store secondary value.
System.setProperty("user.dir", rootProject.projectDir.toString())
System.setProperty("elide.home", rootProject.projectDir.toString())
val micronautVersion: String by settings
val embeddedCompose: String by settings
val embeddedR8: String by settings
val buildUuid: String by settings
val buildlessApiKey: String by settings
dependencyResolutionManagement {
repositoriesMode = RepositoriesMode.PREFER_PROJECT
repositories {
maven("https://maven.pkg.st/")
maven("https://elide-snapshots.storage-download.googleapis.com/repository/v3/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev")
maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev/")
mavenCentral()
google()
}
versionCatalogs {
create("libs") {
from(files("./gradle/elide.versions.toml"))
}
create("mn") {
from("io.micronaut.platform:micronaut-platform:$micronautVersion")
}
}
}
rootProject.name = "elide"
// Third-party modules.
if (embeddedR8 == "true") includeBuild("tools/third_party/google/r8")
if (embeddedCompose == "true") includeBuild("tools/third_party/jetbrains/compose/web")
// External builds.
if (buildUuid == "true") {
includeBuild("packages/uuid") {
dependencySubstitution {
substitute(module("dev.elide:elide-uuid")).using(project(":"))
}
}
}
includeBuild("tools/conventions")
includeBuild("tools/substrate")
// Build modules.
include(
":packages:base",
":packages:bom",
":packages:core",
":packages:frontend",
":packages:graalvm",
":packages:graalvm-js",
":packages:graalvm-jvm",
":packages:graalvm-llvm",
":packages:graalvm-wasm",
":packages:graalvm-py",
":packages:graalvm-rb",
":packages:graalvm-kt",
":packages:graalvm-react",
":packages:model",
":packages:platform",
":packages:runtime",
":packages:proto:proto-core",
":packages:proto:proto-capnp",
":packages:proto:proto-flatbuffers",
":packages:proto:proto-kotlinx",
":packages:proto:proto-protobuf",
":packages:server",
":packages:ssr",
":packages:test",
":tools:processor",
":tools:reports",
":tools:wrappers",
":packages:cli",
)
val buildDocs: String by settings
val buildDocsSite: String by settings
val buildSamples: String by settings
val buildPlugins: String by settings
val buildBenchmarks: String by settings
val buildRpc: String by settings
val buildSsg: String by settings
val buildWasm: String by settings
if (buildWasm == "true") {
include(":packages:wasm")
}
includeBuild(
"tools/elide-build",
)
if (buildSamples == "true") include(
":samples:server:helloworld",
":samples:server:hellocss",
":samples:fullstack:basic:frontend",
":samples:fullstack:basic:server",
":samples:fullstack:ssr:node",
":samples:fullstack:ssr:server",
":samples:fullstack:react:frontend",
":samples:fullstack:react:server",
":samples:fullstack:react-ssr:frontend",
":samples:fullstack:react-ssr:node",
":samples:fullstack:react-ssr:server",
)
if (buildSsg == "true") {
include(
":packages:ssg",
":tools:bundler",
)
}
if (buildRpc == "true") include(":packages:rpc")
if (buildDocs == "true") {
include(
":docs:architecture",
":docs:guide",
)
}
if (buildDocsSite == "true") {
include(
":site:docs:content",
":site:docs:ui",
":site:docs:node",
":site:docs:app",
)
}
if (buildBenchmarks == "true") {
include(
":benchmarks:core",
":benchmarks:graalvm",
":benchmarks:server",
)
}
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
val cachePush: String? by settings
buildless {
remoteCache {
// allow disabling pushing to the remote cache
push = cachePush?.toBooleanStrictOrNull() ?: true
}
}
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
enableFeaturePreview("GROOVY_COMPILATION_AVOIDANCE")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")