New script engine for Gradle

The front page of the Gradle.Org says “We happily support any community effort to create additional build script engines”

Would anyone in development team give me basic starting points and directions for this task?

Is scripting engine well-split from the core system?

What API shoul I use to configure and execute build using some jvm language?

To answer your questions directly:

Would anyone in development team give me basic starting points and directions for this task?

This hasn’t been attempted before, so we don’t have any real guidelines for it. There’s no real plugin API for this kind of thing. You’d have to create effectively your own Gradle front end (i.e. start scripts, distribution etc.)

Is scripting engine well-split from the core system?

Not really. It’s decoupled to a certain extent, but there’s no public API for plugging in a different engine. As it’s not been done before, there are likely to be blocking issues in the current architecture for this (more on this below)

What API should I use to configure and execute build using some jvm language?

Right now, you’d have to take ownership of the entry point and probably duplicate of code in order to inject the bits you need.

More generally…

What language/goal do you have in mind? It’s going to be a considerable amount of work to get this going. We are interested in supporting this kind of thing and would work with you to make it happen, but it’s not going to be a quick process. It will likely take several iterations (i.e. Gradle versions) to open up enough API to make this “easy” to do from the outside. Therefore, we are talking months of work… not days.

If you are interested in working with us on this, this is how it would work:

  1. We’d discuss your use case and goals so we fully understand what you are trying to do and why 2. We’d write a design spec that outlines a path to fulfill the requirement, broken up into discrete stories 3. We schedule the stories into our work as we can, and/or you (or someone else) submit pull requests that implement the stories

We keep doing 2 and 3 until you can meet your goals.

Are you interested in working on this?

Thank you very much for detailed answer,

I am investigating a possibility of using static typed Kotlin language (http://kotlin.jetbrains.org/) to create build scripts. For now, my main concern is understanding if it is possible at all (and can Gradle core run without Groovy runtime).

I understand, that it is not something that can be done in couple of days. And that is why I am very glad to see you are willing to work on this API from inside too.

You’re welcome.

It wouldn’t be possible to run completely without Groovy at runtime. We have some historical dependencies on Groovy (that we are slowly phasing out), and many third party plugins are implemented in Groovy.