-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
64 lines (55 loc) · 1.91 KB
/
Copy pathsettings.gradle.kts
File metadata and controls
64 lines (55 loc) · 1.91 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
/*
* settings.gradle.kts
*
* Gradle settings for interlockSim project
* Migrated from Apache Ant + Ivy build system in 2026
*/
pluginManagement {
val ktlintPluginVersion: String by settings
val detektPluginVersion: String by settings
plugins {
id("org.jlleitschuh.gradle.ktlint") version ktlintPluginVersion
id("io.gitlab.arturbosch.detekt") version detektPluginVersion
}
}
rootProject.name = "interlockSim"
include(":core")
include(":core-test")
include(":desktop-ui")
// :fast-sim is a linuxX64 native CLI binary and cannot be built on non-Linux hosts
// (it requires libxml2 native headers and a Kotlin/Native linuxX64 toolchain).
// Defined here once; consumed in build scripts via `val isLinuxHost: Boolean by gradle.extra`.
val isLinuxHost = System.getProperty("os.name").lowercase().contains("linux")
gradle.extra["isLinuxHost"] = isLinuxHost
if (file("fast-sim/build.gradle.kts").exists()) {
include(":fast-sim")
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
mavenLocal() // For kDisco local development (highest priority)
val githubUsername = System.getenv("GITHUB_ACTOR") ?: providers.gradleProperty("gpr.user").orNull
val githubToken = System.getenv("GITHUB_TOKEN") ?: providers.gradleProperty("gpr.key").orNull
if (!githubUsername.isNullOrEmpty() && !githubToken.isNullOrEmpty()) {
maven {
name = "GitHubPackages-kdisco"
url = uri("https://maven.pkg.github.com/bedaHovorka/kdisco")
credentials {
username = githubUsername
password = githubToken
}
}
} else {
logger.warn("GitHub Packages credentials not available. kDisco must be in mavenLocal().")
}
mavenCentral()
}
}
// Enable build cache for faster incremental builds
// Cache persists between builds and speeds up no-op builds significantly
buildCache {
local {
isEnabled = true
directory = File(rootDir, ".gradle/build-cache")
}
}