Skip to content

Commit d905b68

Browse files
committed
⚡️(ci) 减少对rootProject的重复依赖
1 parent 33a5a5a commit d905b68

3 files changed

Lines changed: 5 additions & 15 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,10 @@ sourceSets {
3030

3131
dependencies {
3232
val libraryVersion = "1.11.2.3"
33-
val mindustryVersion = "v2025.04.X2" //v147
33+
val mindustryVersion = "v2025.04.X3" //v147
3434
api("cf.wayzer:ScriptAgent:$libraryVersion")
3535
implementation("cf.wayzer:LibraryManager:1.6")
3636
compileOnly("com.github.TinyLake.MindustryX:core:$mindustryVersion")
37-
38-
subprojects {
39-
apply(plugin = "kotlin")
40-
dependencies {
41-
api(rootProject)
42-
api(kotlin("script-runtime"))
43-
kotlinScriptDef(rootProject)
44-
}
45-
}
4637
}
4738

4839
kotlin {

buildSrc/src/Module.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import org.gradle.api.Project
44
import org.gradle.api.artifacts.dsl.DependencyHandler
55
import org.gradle.api.tasks.SourceSet
66
import org.gradle.api.tasks.SourceSetContainer
7+
import org.gradle.kotlin.dsl.kotlin
78
import org.gradle.kotlin.dsl.project
89

910
class ModuleScope(val moduleId: String, private val project: Project, private val sourceSet: SourceSet) {
@@ -31,7 +32,8 @@ fun Project.defineModule(
3132
}
3233
ModuleScope(name, project, sourceSet).apply {
3334
dependencies.apply {
34-
api(project("::scripts"))
35+
implementation(kotlin("script-runtime"))
36+
implementation(rootProject)
3537
}
3638
body()
3739
}

scripts/build.gradle.kts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
kotlin("jvm")
55
}
66
dependencies {
7-
val mindustryVersion = "ca40f700fb" //v146.004
7+
val mindustryVersion = "v2025.04.X3" //v146.004
88

99
defineModule("bootStrap") {}
1010
defineModule("coreLibrary") {
@@ -61,7 +61,4 @@ allprojects {
6161
)
6262
}
6363
}
64-
tasks.named("build") {
65-
enabled = false
66-
}
6764
}

0 commit comments

Comments
 (0)