Hi, everyone.
I’m trying JVM component plugins. I have a question, how can I declare external libraries (like slf4j
) in JVM component plugins.
For example,
plugins {
id 'jvm-component'
id 'java-lang'
}
model {
components {
basic(JvmLibrarySpec) {
targetPlatform 'java6'
}
functions(JvmLibrarySpec) {
targetPlatform 'java6'
sources {
java {
dependencies {
library 'basic'
// I'd like to add this external library.
compile 'org.jetbrains:annotations:13.0'
}
}
}
}
}
}
But in this case model (components.functions.getSources() > named(functions)
) don’t have method compile
. So, I’m wondering how to declare external libraries.