What am I doing wrong in my shared configuration s...
# community-support
m
What am I doing wrong in my shared configuration setup? Root project:
Copy code
val outputJar by configurations.creating {
    isCanBeConsumed = false
}

dependencies {
    outputJar(project(":mmorpg-mod", outputJar.name))
}

tasks {
    val deploy by registering(SshDeployTask::class) {
        host = prop("sshDeployHost")
        port = prop("sshDeployPort").toInt()
        user = prop("sshDeployUser")
        if (localProps.hasProperty("sshDeployPass")) {
            password = prop("sshDeployPass")
        }
        remoteDir = prop("sshDeployPath")

        from(outputJar)
    }
}
mmorpg-mod subproject:
Copy code
val outputJar by configurations.creating {
    isCanBeResolved = true
    isCanBeConsumed = true
}

artifacts {
    add(outputJar.name, tasks.named("remapJar"))
}
Error:
Copy code
Could not determine the dependencies of task ':deploy'.
> Could not resolve all dependencies for configuration ':outputJar'.
   > Could not resolve project :mmorpg-mod.
     Required by:
         root project 'mmorpg-mod'
      > A dependency was declared on configuration ':mmorpg-mod:outputJar' of 'root project :' but no variant with that configuration name exists.
t
I am reading:
Required by:
root project 'mmorpg-mod'
So your root project name is "morpg-mod" (check your settings.gradle.kts) and your subproject name is also "mmprg-mod". I would advise to always use unique names. One of the longest standing and most commented bug of gradle ist that dependency resolution gets terrible confused when project names are not unique
m
I see, I'll rename the project folder then and report back