Is it possible to write a custom gradle plugin, wh...
# multiplatform
v
Is it possible to write a custom gradle plugin, which would for example download resource files and save into the shared folder. Then to configure the plugin to run before other plugins (for example before moko-resources plugin)? Basically we have post-clone bash script which does stuff, but we don't want to be limited by the bash language and what to scale using the gradle.
k
yes
🙌 1
👍 1
you could also just write a gradle task
v
Or that, we pretty much don't care what it will be, but we don't know what our options. The issue is that we want to run something somewhere at start of the build, and have high level tools. Aka json/xml parsing libraries, collections, OOP
j
Copy code
val sayHello = tasks.create("sayHello") {
    logger.log(LogLevel.ERROR, "Hello Gradle Task!")
}
tasks["build"].dependsOn(sayHello)
For comprehensive tasks I'd suggest to use gradle conventions written in kotlin. PS: #gradle
🙌 1