I've split my pancakes
Gradle-based library written in Kotlin into multiple modules: pancakes-core
, pancakes-addon1
, ..., pancakes-addonN
. The addon
ones include the core
one.
Now, most users shouldn't care and will just want the default configuration with all the dependencies included. But they will have to write boilerplate:
dependencies {
implementation("pancakes:pancakes-core")
implementation("pancakes:pancakes-addon1")
...
implementation("pancakes:pancakes-addonN")
}
This is a no-go for me. I'll probably have to merge all the modules, although I've just spent some time to branch off some replaceable features into their own modules.
Unless! There is a way to write something like the following:
project(":pancakes-simple") {
dependencies {
autoForwardedApi(":pancakes-core")
autoForwardedApi(":pancakes-addon1")
...
autoForwardedApi(":pancakes-addonN")
}
}
Unfortunately, api
is not enough.