Stubborn stubs

- Remove Stub SourceSet
This commit is contained in:
IThundxr 2024-11-03 15:02:26 -05:00
parent d881ba5302
commit ad2f3c860b
No known key found for this signature in database
GPG Key ID: E291EC97BAF935E6
3 changed files with 4 additions and 21 deletions

View File

@ -9,7 +9,6 @@ plugins {
val api = sourceSets.create("api") val api = sourceSets.create("api")
val lib = sourceSets.create("lib") val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend") val backend = sourceSets.create("backend")
val stubs = sourceSets.create("stubs")
val main = sourceSets.getByName("main") val main = sourceSets.getByName("main")
transitiveSourceSets { transitiveSourceSets {
@ -26,11 +25,8 @@ transitiveSourceSets {
rootCompile() rootCompile()
compile(api, lib) compile(api, lib)
} }
sourceSet(stubs) {
rootCompile()
}
sourceSet(main) { sourceSet(main) {
compile(api, lib, backend, stubs) compile(api, lib, backend)
} }
sourceSet(sourceSets.getByName("test")) { sourceSet(sourceSets.getByName("test")) {
implementation(api, lib, backend) implementation(api, lib, backend)
@ -46,7 +42,6 @@ jarSets {
outgoing("commonApiOnly", api) outgoing("commonApiOnly", api)
outgoing("commonLib", lib) outgoing("commonLib", lib)
outgoing("commonBackend", backend) outgoing("commonBackend", backend)
outgoing("commonStubs", stubs)
outgoing("commonImpl", main) outgoing("commonImpl", main)
// For publishing. // For publishing.

View File

@ -10,7 +10,6 @@ plugins {
val api = sourceSets.create("api") val api = sourceSets.create("api")
val lib = sourceSets.create("lib") val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend") val backend = sourceSets.create("backend")
val stubs = sourceSets.create("stubs")
val main = sourceSets.getByName("main") val main = sourceSets.getByName("main")
transitiveSourceSets { transitiveSourceSets {
@ -27,12 +26,7 @@ transitiveSourceSets {
rootCompile() rootCompile()
compile(api, lib) compile(api, lib)
} }
sourceSet(stubs) {
rootCompile()
}
sourceSet(main) { sourceSet(main) {
// Don't want stubs at runtime
compile(stubs)
implementation(api, lib, backend) implementation(api, lib, backend)
} }
@ -41,7 +35,7 @@ transitiveSourceSets {
platform { platform {
commonProject = project(":common") commonProject = project(":common")
compileWithCommonSourceSets(api, lib, backend, stubs, main) compileWithCommonSourceSets(api, lib, backend, main)
setupLoomMod(api, lib, backend, main) setupLoomMod(api, lib, backend, main)
setupLoomRuns() setupLoomRuns()
setupFatJar(api, lib, backend, main) setupFatJar(api, lib, backend, main)
@ -83,6 +77,5 @@ dependencies {
"forApi"(project(path = ":common", configuration = "commonApiOnly")) "forApi"(project(path = ":common", configuration = "commonApiOnly"))
"forLib"(project(path = ":common", configuration = "commonLib")) "forLib"(project(path = ":common", configuration = "commonLib"))
"forBackend"(project(path = ":common", configuration = "commonBackend")) "forBackend"(project(path = ":common", configuration = "commonBackend"))
"forStubs"(project(path = ":common", configuration = "commonStubs"))
"forMain"(project(path = ":common", configuration = "commonImpl")) "forMain"(project(path = ":common", configuration = "commonImpl"))
} }

View File

@ -10,7 +10,6 @@ plugins {
val api = sourceSets.create("api") val api = sourceSets.create("api")
val lib = sourceSets.create("lib") val lib = sourceSets.create("lib")
val backend = sourceSets.create("backend") val backend = sourceSets.create("backend")
val stubs = sourceSets.create("stubs")
val main = sourceSets.getByName("main") val main = sourceSets.getByName("main")
transitiveSourceSets { transitiveSourceSets {
@ -27,11 +26,8 @@ transitiveSourceSets {
rootCompile() rootCompile()
compile(api, lib) compile(api, lib)
} }
sourceSet(stubs) {
rootCompile()
}
sourceSet(main) { sourceSet(main) {
compile(api, lib, backend, stubs) compile(api, lib, backend)
} }
createCompileConfigurations() createCompileConfigurations()
@ -39,7 +35,7 @@ transitiveSourceSets {
platform { platform {
commonProject = project(":common") commonProject = project(":common")
compileWithCommonSourceSets(api, lib, backend, stubs, main) compileWithCommonSourceSets(api, lib, backend, main)
setupLoomMod(api, lib, backend, main) setupLoomMod(api, lib, backend, main)
setupLoomRuns() setupLoomRuns()
setupFatJar(api, lib, backend, main) setupFatJar(api, lib, backend, main)
@ -91,6 +87,5 @@ dependencies {
"forApi"(project(path = ":common", configuration = "commonApiOnly")) "forApi"(project(path = ":common", configuration = "commonApiOnly"))
"forLib"(project(path = ":common", configuration = "commonLib")) "forLib"(project(path = ":common", configuration = "commonLib"))
"forBackend"(project(path = ":common", configuration = "commonBackend")) "forBackend"(project(path = ":common", configuration = "commonBackend"))
"forStubs"(project(path = ":common", configuration = "commonStubs"))
"forMain"(project(path = ":common", configuration = "commonImpl")) "forMain"(project(path = ":common", configuration = "commonImpl"))
} }