Are there examples on how we can use common gradle...
# gradle
a
Are there examples on how we can use common gradle kts files across other gradle files? Typically, I would apply the kotlin jvm plugin in subprojects and do some configurations. However, if I don’t apply the same plugin in the module specific gradle file, it won’t recognize jvm methods such as
implementation
. Is there a way around that?
e
Copy code
dependencies {
    "implementation"(...)
}
j
I create precompiled plugin for each type so later I just add some specific dependencies
a
^ How does that work? I have a
buildSrc
plugin already but don’t i need to apply the kotlin plugin there?
Thanks for all your help! I ended up getting it to work here: https://github.com/AllanWang/Discord-Bot/pull/8 It turns out that I should use
apply(plugin = "org.jetbrains.kotlin.jvm")
instead of
plugins { }
. It also turns out that the other
build.gradle.kts
files still accept
implementation
without needing quotations