Lucas Holden
08/09/2025, 6:17 AMdependencies {
myCfg(project(":common"))
}
configurations {
myCfg {
canBeResolved = true
canBeConsumed = false
attributes {
attribute(MyAttributes.PLATFORM, "thisPlatform")
attribute(MyAttributes.SOURCETYPE, "main")
}
}
// both of these somehow use :common's default export, which is a different jar to the one myCfg consumes
compileClasspath.extendsFrom(myCfg)
runtimeClasspath.extendsFrom(myCfg)
}
Lucas Holden
08/09/2025, 6:24 AMproject(path=":common", configuration="producingConfiguration"
), but that makes IDEA see common as a wholly separate project. It starts linking me to compiled classes and not updating suggestions in platform based on changes to common, and it's basically unworkable when developing both parts simultaneously.Philip W
08/09/2025, 6:54 AMPhilip W
08/09/2025, 6:55 AMPhilip W
08/09/2025, 6:56 AMLucas Holden
08/09/2025, 7:20 AMdependencyScope
configuration though, and I've been reading everything I could find, so clearly there's some information I'm missing on how this is used normally. It's also 3 AM right now and I've been nose-deep in this buildscript since this morning, so that probably has something to do with it.
If you'd be willing to take a look, I could really use some more experienced eyes on it. https://github.com/ByThePowerOfScience/DungeonDesigner/tree/architectury
For all intents and purposes, the only two buildscripts we care about are common and fabric.Lucas Holden
08/09/2025, 7:21 AMLucas Holden
08/09/2025, 7:35 AMLucas Holden
08/09/2025, 7:36 AMPhilip W
08/09/2025, 7:42 AMVampire
08/09/2025, 3:32 PMimplementation
or compileOnly
, hence "dependencyScope".
Attributes are never inherited from one configuration to another, even if you extend from one resolvable to another resolvable.
If you want attributes to be carried over, you have to declare them on the dependency directly, then those are used.