-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
50 lines (46 loc) · 1.47 KB
/
settings.gradle.kts
File metadata and controls
50 lines (46 loc) · 1.47 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
/**
* Settings configuration for XTC projects.
*
* Set localOnly=true in gradle.properties to use only mavenLocal for development.
* Otherwise, resolves from Maven Central (releases and snapshots).
*/
pluginManagement {
val localOnly: String by settings
repositories {
// Add remote Maven repositories unless localOnly mode
if (!localOnly.toBoolean()) {
maven("https://central.sonatype.com/repository/maven-snapshots/") {
mavenContent { snapshotsOnly() }
}
mavenCentral()
gradlePluginPortal()
}
// Always check Maven Local last (or first in localOnly mode)
mavenLocal()
// Gradle Plugin Portal for standard plugins
if (localOnly.toBoolean()) {
gradlePluginPortal()
}
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}
@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
val localOnly: String by settings
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
// Add remote Maven repositories unless localOnly mode
if (!localOnly.toBoolean()) {
maven("https://central.sonatype.com/repository/maven-snapshots/") {
mavenContent { snapshotsOnly() }
}
mavenCentral()
}
// Always include Maven Local
mavenLocal()
}
}
rootProject.name = "HelloXtc"
include("hello-xtc")