Skip to content

Commit bc4ad99

Browse files
Update settings.gradle.kts
1 parent 856a4be commit bc4ad99

File tree

1 file changed

+116
-38
lines changed

1 file changed

+116
-38
lines changed
Lines changed: 116 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,152 @@
11
/*
2-
* This file is part of AndroidIDE.
2+
* This file is part of AndroidCodeStudio.
33
*
4-
* AndroidIDE is free software: you can redistribute it and/or modify
4+
* AndroidCodeStudio is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
66
* the Free Software Foundation, either version 3 of the License, or
77
* (at your option) any later version.
88
*
9-
* AndroidIDE is distributed in the hope that it will be useful,
9+
* AndroidCodeStudio is distributed in the hope that it will be useful,
1010
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1212
* GNU General Public License for more details.
1313
*
1414
* You should have received a copy of the GNU General Public License
15-
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
15+
* along with AndroidCodeStudio. If not, see <https://www.gnu.org/licenses/>.
1616
*/
1717

1818
@file:Suppress("UnstableApiUsage")
1919

2020
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
2121

2222
pluginManagement {
23-
includeBuild("../build-logic")
23+
includeBuild("composite-builds/build-logic") {
24+
name = "build-logic"
25+
}
2426

2527
repositories {
26-
// maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
27-
// maven { url = uri("https://maven.aliyun.com/repository/central") }
28-
// maven { url = uri("https://maven.aliyun.com/repository/google") }
29-
3028
gradlePluginPortal()
3129
google()
3230
mavenCentral()
3331
}
3432
}
3533

3634
dependencyResolutionManagement {
35+
val dependencySubstitutions = mapOf(
36+
"build-deps" to arrayOf(
37+
"appintro",
38+
"fuzzysearch",
39+
"google-java-format",
40+
"java-compiler",
41+
"javac",
42+
"javapoet",
43+
"jaxp",
44+
"jdk-compiler",
45+
"jdk-jdeps",
46+
"jdt",
47+
"layoutlib-api",
48+
"logback-core"
49+
),
50+
51+
"build-deps-common" to arrayOf(
52+
"desugaring-core"
53+
)
54+
)
55+
56+
for ((build, modules) in dependencySubstitutions) {
57+
includeBuild("composite-builds/${build}") {
58+
this.name = build
59+
dependencySubstitution {
60+
for (module in modules) {
61+
substitute(module("com.tom.rv2ide.build:${module}"))
62+
.using(project(":${module}"))
63+
}
64+
}
65+
}
66+
}
67+
68+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
3769
repositories {
38-
// maven { url = uri("https://maven.aliyun.com/repository/central") }
39-
// maven { url = uri("https://maven.aliyun.com/repository/google") }
70+
mavenLocal()
4071
google()
4172
mavenCentral()
42-
}
43-
44-
versionCatalogs {
45-
create("libs") {
46-
from(files("../../gradle/libs.versions.toml"))
47-
}
73+
maven { url = uri("https://jitpack.io") }
74+
maven { url = uri("https://repo.gradle.org/gradle/libs-releases") }
75+
maven { url = uri("https://www.jetbrains.com/intellij-repository/releases") }
4876
}
4977
}
5078

51-
include(
52-
":appintro",
53-
":fuzzysearch",
54-
":google-java-format",
55-
":javac",
56-
":javapoet",
57-
":jaxp",
58-
":java-compiler",
59-
":jdk-compiler",
60-
":jdk-jdeps",
61-
":jdt",
62-
":layoutlib-api",
63-
":logback-core",
64-
)
79+
gradle.rootProject {
80+
val appMainVersion = System.getenv("MAIN_VERSION") ?: "1.0.0"
81+
val revision = "r${System.getenv("REVISION_NUM") ?: "03"}"
82+
val baseVersion = "$appMainVersion+gh.$revision"
83+
println("Android code studio version: $baseVersion")
84+
project.setProperty("version", baseVersion)
85+
}
6586

66-
rootProject.name = "build-deps"
87+
rootProject.name = "AndroidCodeStudio"
6788

68-
gradle.rootProject {
89+
include(
90+
":annotation:annotations",
91+
":annotation:processors",
92+
":annotation:processors-ksp",
6993

70-
// required for setting SDK location for android modules
71-
project.file("../../local.properties")
72-
.takeIf { it.exists() }
73-
?.copyTo(project.file("local.properties"), overwrite = true)
74-
}
94+
":external:acsprovider",
95+
":external:atc",
96+
":core:projectdata",
97+
":external:logwire",
98+
99+
// ":server:server",
100+
// ":server:shared",
101+
102+
":core:actions",
103+
":core:app",
104+
":ideconfigurations",
105+
":core:common",
106+
":core:indexing-api",
107+
":core:indexing-core",
108+
":core:lsp-api",
109+
":core:lsp-models",
110+
":core:projects",
111+
":core:resources",
112+
":editor:api",
113+
":editor:impl",
114+
":editor:lexers",
115+
":editor:treesitter",
116+
":event:eventbus",
117+
":event:eventbus-android",
118+
":event:eventbus-events",
119+
":java:javac-services",
120+
":java:lsp-setup",
121+
":java:lsp",
122+
":logging:idestats",
123+
":logging:logger",
124+
":logging:logsender",
125+
":termux:application",
126+
":termux:emulator",
127+
":termux:shared",
128+
":termux:view",
129+
":tooling:api",
130+
":tooling:builder-model-impl",
131+
":tooling:events",
132+
":tooling:impl",
133+
":tooling:model",
134+
":tooling:plugin",
135+
":tooling:plugin-config",
136+
":utilities:build-info",
137+
":utilities:flashbar",
138+
":utilities:framework-stubs",
139+
":utilities:lookup",
140+
":utilities:preferences",
141+
":utilities:shared",
142+
":utilities:templates-api",
143+
":utilities:templates-impl",
144+
":utilities:treeview",
145+
":utilities:uidesigner",
146+
":utilities:xml-inflater",
147+
":xml:aaptcompiler",
148+
":xml:dom",
149+
":xml:lsp",
150+
":xml:resources-api",
151+
":xml:utils",
152+
)

0 commit comments

Comments
 (0)