Open antonalechnovic opened 4 years ago
You can apply the plugin with the PluginManager. You can get an instance from it from the Project.
The "closure" is an Gradle extension. Get an instance of it with project.extensions.getByType(ClassOfTheExtension::java:class)
.
You can simply set the properties on it.
The class of the extension can be find somewhere in the source code of the applied plugin.
There are also some examples here: https://docs.gradle.org/current/userguide/kotlin_dsl.html#groovy_closures_from_kotlin
I am trying to convert the following groovy snippet to Kotlin:
How to set
target.artifactory.contextUrl
and remaining parameters?I want to configure simillarly to
build.gradle
: