From ad2f3c860bb57d842a22501c0f8353c60a73ea82 Mon Sep 17 00:00:00 2001 From: IThundxr Date: Sun, 3 Nov 2024 15:02:26 -0500 Subject: [PATCH] Stubborn stubs - Remove Stub SourceSet --- common/build.gradle.kts | 7 +------ fabric/build.gradle.kts | 9 +-------- forge/build.gradle.kts | 9 ++------- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 7e411feb9..37e3d43b5 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -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 { @@ -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) @@ -46,7 +42,6 @@ jarSets { outgoing("commonApiOnly", api) outgoing("commonLib", lib) outgoing("commonBackend", backend) - outgoing("commonStubs", stubs) outgoing("commonImpl", main) // For publishing. diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index 50d15209c..9a606f33b 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -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 { @@ -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) } @@ -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) @@ -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")) } diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index d70c1ce80..68e2442ba 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -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 { @@ -27,11 +26,8 @@ transitiveSourceSets { rootCompile() compile(api, lib) } - sourceSet(stubs) { - rootCompile() - } sourceSet(main) { - compile(api, lib, backend, stubs) + compile(api, lib, backend) } createCompileConfigurations() @@ -39,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) @@ -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")) }