Skip to content

Commit

Permalink
Stubborn stubs
Browse files Browse the repository at this point in the history
- Remove Stub SourceSet
  • Loading branch information
IThundxr committed Nov 3, 2024
1 parent d881ba5 commit ad2f3c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
7 changes: 1 addition & 6 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ plugins {
val api = sourceSets.create("api")
val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend")
val stubs = sourceSets.create("stubs")
val main = sourceSets.getByName("main")

transitiveSourceSets {
Expand All @@ -26,11 +25,8 @@ transitiveSourceSets {
rootCompile()
compile(api, lib)
}
sourceSet(stubs) {
rootCompile()
}
sourceSet(main) {
compile(api, lib, backend, stubs)
compile(api, lib, backend)
}
sourceSet(sourceSets.getByName("test")) {
implementation(api, lib, backend)
Expand All @@ -46,7 +42,6 @@ jarSets {
outgoing("commonApiOnly", api)
outgoing("commonLib", lib)
outgoing("commonBackend", backend)
outgoing("commonStubs", stubs)
outgoing("commonImpl", main)

// For publishing.
Expand Down
9 changes: 1 addition & 8 deletions fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ plugins {
val api = sourceSets.create("api")
val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend")
val stubs = sourceSets.create("stubs")
val main = sourceSets.getByName("main")

transitiveSourceSets {
Expand All @@ -27,12 +26,7 @@ transitiveSourceSets {
rootCompile()
compile(api, lib)
}
sourceSet(stubs) {
rootCompile()
}
sourceSet(main) {
// Don't want stubs at runtime
compile(stubs)
implementation(api, lib, backend)
}

Expand All @@ -41,7 +35,7 @@ transitiveSourceSets {

platform {
commonProject = project(":common")
compileWithCommonSourceSets(api, lib, backend, stubs, main)
compileWithCommonSourceSets(api, lib, backend, main)
setupLoomMod(api, lib, backend, main)
setupLoomRuns()
setupFatJar(api, lib, backend, main)
Expand Down Expand Up @@ -83,6 +77,5 @@ dependencies {
"forApi"(project(path = ":common", configuration = "commonApiOnly"))
"forLib"(project(path = ":common", configuration = "commonLib"))
"forBackend"(project(path = ":common", configuration = "commonBackend"))
"forStubs"(project(path = ":common", configuration = "commonStubs"))
"forMain"(project(path = ":common", configuration = "commonImpl"))
}
9 changes: 2 additions & 7 deletions forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ plugins {
val api = sourceSets.create("api")
val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend")
val stubs = sourceSets.create("stubs")
val main = sourceSets.getByName("main")

transitiveSourceSets {
Expand All @@ -27,19 +26,16 @@ transitiveSourceSets {
rootCompile()
compile(api, lib)
}
sourceSet(stubs) {
rootCompile()
}
sourceSet(main) {
compile(api, lib, backend, stubs)
compile(api, lib, backend)
}

createCompileConfigurations()
}

platform {
commonProject = project(":common")
compileWithCommonSourceSets(api, lib, backend, stubs, main)
compileWithCommonSourceSets(api, lib, backend, main)
setupLoomMod(api, lib, backend, main)
setupLoomRuns()
setupFatJar(api, lib, backend, main)
Expand Down Expand Up @@ -91,6 +87,5 @@ dependencies {
"forApi"(project(path = ":common", configuration = "commonApiOnly"))
"forLib"(project(path = ":common", configuration = "commonLib"))
"forBackend"(project(path = ":common", configuration = "commonBackend"))
"forStubs"(project(path = ":common", configuration = "commonStubs"))
"forMain"(project(path = ":common", configuration = "commonImpl"))
}

0 comments on commit ad2f3c8

Please sign in to comment.