converting from Groovy Gradle DSL to Kotlin Gradle DSL

Answered
I am currently working on developing a plugin that can convert Groovy Gradle DSL to Kotlin Gradle DSL. To gain a better understanding of how to create this plugin, I considered exploring J2K. However, I became confused about the purpose of the 'old' and 'new' directories.
https://github.com/JetBrains/intellij-community/tree/master/plugins/kotlin/j2k
 What these directories are used for?
Also, I am wondering if this a good approach to build that plugin .
 
3 comments
Comment actions Permalink
Official comment

"Old" is an obsolete implementation of J2K. You should only look at the new one. Theoretically, you can take the same architectural approach as is taken in the new J2K, but converting Groovy correctly is probably much more complicated than converting Java, because of implicit types and other such features.

 

You may find these existing plugins useful:

https://github.com/bernaferrari/GradleKotlinConverter

https://github.com/DRSchlaubi/Intellij-GradleUpdater

Comment actions Permalink

I see the old implementation is easy to understand the stages and conversion logic.

Wouldn't it work if I followed the old architectural approach?

Are there any resources to understand the architecture and theory of the new one?

0
Comment actions Permalink

Sure, use whatever is more convenient for you. There are no docs AFAIK.

0

Please sign in to leave a comment.