#Problem with gradle submodule used as dependency by other module

1 messages · Page 1 of 1 (latest)

slender ingot
#

I've explained the issue a few days ago but haven't found a solution yet so I'm making a thread to keep it from getting lost.

I have a project called Kommons that has two modules in this case:

  • spigot
  • universal

Module universal is added as dependency to the spigot module like so:

implementation project(path: ":universal", configuration: "shadow")

Submodule universal has a few dependencies that I want spigot module to inherit:

    implementation "dev.dejvokep:boosted-yaml:1.3"
    implementation "org.jetbrains:annotations:24.0.0"

they're relocated using shadow plugin:

tasks {
    shadowJar {
        relocate("org.intellij.lang.annotations", "com.github.kaspiandev.kommons.lib.intellij.annotations")
        relocate("org.jetbrains.annotations", "com.github.kaspiandev.kommons.lib.jetbrains.annotations")
        relocate("dev.dejvokep.boostedyaml", "com.github.kaspiandev.kommons.lib.boostedyaml")
    }
}

But submodule spigot seems to be unable to see or use those with both their normal package or the relocated that should start with com.github.kaspiandev.kommons.lib.
Everything seems to work normally when I add universal as dependency the classic way:

implementation "com.github.kaspiandev.kommons:universal:1-SNAPSHOT"

(image below is my wanted behavior)

#

i hope thats a good enough description lol

#

Problem with gradle submodule used as dependency by other module

slender ingot
#

wow turns out this could be intellij bug

#

because if i ignore the linter, rename packages to the relocated ones the program compiles