Skip to content

Commit

Permalink
Fix some dependencies not appearing in the POM
Browse files Browse the repository at this point in the history
Again! This time it was just the night-config ones.
  • Loading branch information
SquidDev committed Jan 3, 2024
1 parent 8be6b1b commit f115d43
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ abstract class CCTweakedExtension(
}

/**
* Exclude a dependency from being publisehd in Maven.
* Exclude a dependency from being published in Maven.
*/
fun exclude(dep: Dependency) {
excludedDeps.add(dep)
Expand Down
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ kotlin = ["kotlin-stdlib", "kotlin-coroutines"]
externalMods-common = ["jei-api", "nightConfig-core", "nightConfig-toml"]
externalMods-forge-compile = ["moreRed", "oculus", "jei-api"]
externalMods-forge-runtime = ["jei-forge"]
externalMods-fabric = ["nightConfig-core", "nightConfig-toml"]
externalMods-fabric-compile = ["fabricPermissions", "iris", "jei-api", "rei-api", "rei-builtin"]
externalMods-fabric-runtime = ["jei-fabric", "modmenu"]

Expand Down
39 changes: 25 additions & 14 deletions projects/fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,25 @@ fun addRemappedConfiguration(name: String) {
addRemappedConfiguration("testWithSodium")
addRemappedConfiguration("testWithIris")

configurations {
// Declare some configurations which are both included (jar-in-jar-ed) and a normal dependency (so they appear in
// our POM).
val includeRuntimeOnly by registering {
isCanBeConsumed = false
isCanBeResolved = false
}
val includeImplementation by registering {
isCanBeConsumed = false
isCanBeResolved = false
}

include { extendsFrom(includeRuntimeOnly.get(), includeImplementation.get()) }
runtimeOnly { extendsFrom(includeRuntimeOnly.get()) }
implementation { extendsFrom(includeImplementation.get()) }
}

dependencies {
clientCompileOnly(variantOf(libs.emi) { classifier("api") })
modImplementation(libs.bundles.externalMods.fabric) { cct.exclude(this) }
modCompileOnly(libs.bundles.externalMods.fabric.compile) {
exclude("net.fabricmc", "fabric-loader")
exclude("net.fabricmc.fabric-api")
Expand All @@ -63,24 +79,19 @@ dependencies {
"modTestWithIris"(libs.iris)
"modTestWithIris"(libs.sodium)

include(libs.cobalt)
include(libs.jzlib)
include(libs.netty.http)
include(libs.netty.socks)
include(libs.netty.proxy)
include(libs.nightConfig.core)
include(libs.nightConfig.toml)
"includeRuntimeOnly"(libs.cobalt)
"includeRuntimeOnly"(libs.jzlib)
"includeRuntimeOnly"(libs.netty.http)
"includeRuntimeOnly"(libs.netty.socks)
"includeRuntimeOnly"(libs.netty.proxy)

"includeImplementation"(libs.nightConfig.core)
"includeImplementation"(libs.nightConfig.toml)

// Pull in our other projects. See comments in MinecraftConfigurations on this nastiness.
api(commonClasses(project(":fabric-api"))) { cct.exclude(this) }
clientApi(clientClasses(project(":fabric-api"))) { cct.exclude(this) }
implementation(project(":core")) { cct.exclude(this) }
// These are transitive deps of :core, so we don't need these deps. However, we want them to appear as runtime deps
// in our POM, and this is the easiest way.
runtimeOnly(libs.cobalt)
runtimeOnly(libs.netty.http)
runtimeOnly(libs.netty.socks)
runtimeOnly(libs.netty.proxy)

annotationProcessorEverywhere(libs.autoService)

Expand Down

0 comments on commit f115d43

Please sign in to comment.