using Kotlin inside Jenkins Plugins

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

using Kotlin inside Jenkins Plugins

Joseph P
Hey there,

We need to solve a problem for those wanting to use Kotlin "stdlib-jre8"
I see two solutions
  1. Create a Jenkins Kotlin plugin for Kotlin standard library.
  2. Each plugin that uses Kotlin standard library can set plugin first class loader to true.
Looking at existing Kotlin plugins.

Some decided for plugin first class loader.
https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts
https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts
https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts

others are living a dangerous life:
https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle
https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle
https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts

This would hopefully help others in adopting Kotlin inside the Jenkins plugin community.

Best regards
Joseph

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/7baf00f9-7cae-4806-b31b-bd38fce79dcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Joseph P
Also there's the question of should Kotlin build steps be added to parent pom?
https://github.com/jenkinsci/plugin-pom

Den onsdag den 17. januar 2018 kl. 19.56.44 UTC+1 skrev Joseph P:
Hey there,

We need to solve a problem for those wanting to use Kotlin "stdlib-jre8"
I see two solutions
  1. Create a Jenkins Kotlin plugin for Kotlin standard library.
  2. Each plugin that uses Kotlin standard library can set plugin first class loader to true.
Looking at existing Kotlin plugins.

Some decided for plugin first class loader.
<a href="https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fdoktor-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6uHEaXplXdLuSB3ObxQYB6rGU_g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fdoktor-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6uHEaXplXdLuSB3ObxQYB6rGU_g&#39;;return true;">https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts
<a href="https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcasz%2Faccurev-client-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMWtVN-WF1xaV1olL4jUVlZYG4Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcasz%2Faccurev-client-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMWtVN-WF1xaV1olL4jUVlZYG4Q&#39;;return true;">https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts
<a href="https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSimpleFinance%2Fjenkins-firebase-test-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHiVo4yfsAWP-5m3wdm536q137uSg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSimpleFinance%2Fjenkins-firebase-test-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHiVo4yfsAWP-5m3wdm536q137uSg&#39;;return true;">https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts

others are living a dangerous life:
<a href="https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmichaelsiepmann%2FJenkinsstate-Plugin%2Fblob%2Fmaster%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVy5OfEc-Hw4fFFBeemsXQ7N20xw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmichaelsiepmann%2FJenkinsstate-Plugin%2Fblob%2Fmaster%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVy5OfEc-Hw4fFFBeemsXQ7N20xw&#39;;return true;">https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle
<a href="https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkoral--%2Fandroid-gradle-jenkins-plugin%2Fblob%2Fmaster%2Fplugin%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj-1OUUaG1nZsbBQe3oIgyJfY3Ag&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkoral--%2Fandroid-gradle-jenkins-plugin%2Fblob%2Fmaster%2Fplugin%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj-1OUUaG1nZsbBQe3oIgyJfY3Ag&#39;;return true;">https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle
<a href="https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Faaron-vaz%2Fgithub-release-helper-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHh_1J7FuxhHP2bgJYMaK86-xS4ng&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Faaron-vaz%2Fgithub-release-helper-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHh_1J7FuxhHP2bgJYMaK86-xS4ng&#39;;return true;">https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts

This would hopefully help others in adopting Kotlin inside the Jenkins plugin community.

Best regards
Joseph

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Robert Sandell-2
Does Kotlin have a deprecation/compatibility policy that is compatible with Jenkins? i.e. would a plugin compiled and tested against kotlin 1.3 work with kotlin 2,3,4 etc?

If that is the case then I think a kotlin-stdlib-plugin would be the best choice.

regarding the build step, we haven't even added the groovy build step to it yet so I don't know :)

/B

2018-01-17 20:02 GMT+01:00 Joseph P <[hidden email]>:
Also there's the question of should Kotlin build steps be added to parent pom?
https://github.com/jenkinsci/plugin-pom

Den onsdag den 17. januar 2018 kl. 19.56.44 UTC+1 skrev Joseph P:
Hey there,

We need to solve a problem for those wanting to use Kotlin "stdlib-jre8"
I see two solutions
  1. Create a Jenkins Kotlin plugin for Kotlin standard library.
  2. Each plugin that uses Kotlin standard library can set plugin first class loader to true.
Looking at existing Kotlin plugins.

Some decided for plugin first class loader.

others are living a dangerous life:

This would hopefully help others in adopting Kotlin inside the Jenkins plugin community.

Best regards
Joseph

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees, Inc.
CloudBees-Logo.png
Twitter: robert_sandell

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS3uH9zvA4vxju3dh8gc9dNkCoJm-Ho3zYW_aLOZwM76tA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Joseph P
This should cover the compatibility question, https://kotlinlang.org/docs/reference/compatibility.html, seems like we would have to create a plugin for each 1.X version 😕 or we could probably do something with the compatibility modes

Seems gradle with gradle-jpi-plugin using the Kotlin Gradle DSL or groovy is the best choice then sadly gradle 4.x has issue with sezpoz when needing to process Jenkins annotation like @Extension and so on.
Reported here https://github.com/jglick/sezpoz/issues/12
Possible fix/workaround here: https://github.com/jenkinsci/gradle-jpi-plugin/pull/97

Den torsdag den 18. januar 2018 kl. 12.44.31 UTC+1 skrev Robert Sandell:
Does Kotlin have a deprecation/compatibility policy that is compatible with Jenkins? i.e. would a plugin compiled and tested against kotlin 1.3 work with kotlin 2,3,4 etc?

If that is the case then I think a kotlin-stdlib-plugin would be the best choice.

regarding the build step, we haven't even added the groovy build step to it yet so I don't know :)

/B

2018-01-17 20:02 GMT+01:00 Joseph P <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="w0hDFK_IAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jose...@...>:
Also there's the question of should Kotlin build steps be added to parent pom?
<a href="https://github.com/jenkinsci/plugin-pom" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fplugin-pom\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1BpmosyUu9SsMm4AppfFqlN8gFw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fplugin-pom\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1BpmosyUu9SsMm4AppfFqlN8gFw&#39;;return true;">https://github.com/jenkinsci/plugin-pom

Den onsdag den 17. januar 2018 kl. 19.56.44 UTC+1 skrev Joseph P:
Hey there,

We need to solve a problem for those wanting to use Kotlin "stdlib-jre8"
I see two solutions
  1. Create a Jenkins Kotlin plugin for Kotlin standard library.
  2. Each plugin that uses Kotlin standard library can set plugin first class loader to true.
Looking at existing Kotlin plugins.

Some decided for plugin first class loader.
<a href="https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fdoktor-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6uHEaXplXdLuSB3ObxQYB6rGU_g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fdoktor-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6uHEaXplXdLuSB3ObxQYB6rGU_g&#39;;return true;">https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts
<a href="https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcasz%2Faccurev-client-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMWtVN-WF1xaV1olL4jUVlZYG4Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcasz%2Faccurev-client-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMWtVN-WF1xaV1olL4jUVlZYG4Q&#39;;return true;">https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts
<a href="https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSimpleFinance%2Fjenkins-firebase-test-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHiVo4yfsAWP-5m3wdm536q137uSg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSimpleFinance%2Fjenkins-firebase-test-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHiVo4yfsAWP-5m3wdm536q137uSg&#39;;return true;">https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts

others are living a dangerous life:
<a href="https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmichaelsiepmann%2FJenkinsstate-Plugin%2Fblob%2Fmaster%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVy5OfEc-Hw4fFFBeemsXQ7N20xw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmichaelsiepmann%2FJenkinsstate-Plugin%2Fblob%2Fmaster%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVy5OfEc-Hw4fFFBeemsXQ7N20xw&#39;;return true;">https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle
<a href="https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkoral--%2Fandroid-gradle-jenkins-plugin%2Fblob%2Fmaster%2Fplugin%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj-1OUUaG1nZsbBQe3oIgyJfY3Ag&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkoral--%2Fandroid-gradle-jenkins-plugin%2Fblob%2Fmaster%2Fplugin%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj-1OUUaG1nZsbBQe3oIgyJfY3Ag&#39;;return true;">https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle
<a href="https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Faaron-vaz%2Fgithub-release-helper-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHh_1J7FuxhHP2bgJYMaK86-xS4ng&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Faaron-vaz%2Fgithub-release-helper-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHh_1J7FuxhHP2bgJYMaK86-xS4ng&#39;;return true;">https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts

This would hopefully help others in adopting Kotlin inside the Jenkins plugin community.

Best regards
Joseph

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="w0hDFK_IAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees,<a href="http:///" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http:///&#39;;return true;" onclick="this.href=&#39;http:///&#39;;return true;"> Inc.
<a href="http://www.cloudbees.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cloudbees.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFD5q8pAuc6CUBHDK6LlPC4hQt3lQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cloudbees.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFD5q8pAuc6CUBHDK6LlPC4hQt3lQ&#39;;return true;">CloudBees-Logo.png
E: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="w0hDFK_IAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rsan...@...
Twitter: robert_sandell

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/be2c88f3-36b4-43bc-bb8b-718b67dc80f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Joseph P
I might have misread it: 

Experimental features are not backwards compatible with different minor versions.
However for the JVM

Compatibility guarantees for Kotlin releases

Kotlin for JVM:

  • patch version updates (e.g. 1.1.X) are fully compatible;
  • minor version updates (e.g. 1.X) are backwards compatible.

Den torsdag den 18. januar 2018 kl. 14.54.31 UTC+1 skrev Joseph P:
This should cover the compatibility question, <a href="https://kotlinlang.org/docs/reference/compatibility.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fkotlinlang.org%2Fdocs%2Freference%2Fcompatibility.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGqbdLuDBczN0ARd11XTdSfHg03Vg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fkotlinlang.org%2Fdocs%2Freference%2Fcompatibility.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGqbdLuDBczN0ARd11XTdSfHg03Vg&#39;;return true;">https://kotlinlang.org/docs/reference/compatibility.html, seems like we would have to create a plugin for each 1.X version 😕 or we could probably do something with the compatibility modes

Seems gradle with gradle-jpi-plugin using the Kotlin Gradle DSL or groovy is the best choice then sadly gradle 4.x has issue with <a href="https://github.com/jglick/sezpoz" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjglick%2Fsezpoz\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgOVoBhy-UidVXUC7RhiTAIuN22w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjglick%2Fsezpoz\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgOVoBhy-UidVXUC7RhiTAIuN22w&#39;;return true;">sezpoz when needing to process Jenkins annotation like @Extension and so on.
Reported here <a href="https://github.com/jglick/sezpoz/issues/12" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjglick%2Fsezpoz%2Fissues%2F12\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHibxto8onC276TrA5g6SCA98_xGg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjglick%2Fsezpoz%2Fissues%2F12\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHibxto8onC276TrA5g6SCA98_xGg&#39;;return true;">https://github.com/jglick/sezpoz/issues/12
Possible fix/workaround here: <a href="https://github.com/jenkinsci/gradle-jpi-plugin/pull/97" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fgradle-jpi-plugin%2Fpull%2F97\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGbexa-Arja_3S0LfhO7aC4f7RiEg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fgradle-jpi-plugin%2Fpull%2F97\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGbexa-Arja_3S0LfhO7aC4f7RiEg&#39;;return true;">https://github.com/jenkinsci/gradle-jpi-plugin/pull/97

Den torsdag den 18. januar 2018 kl. 12.44.31 UTC+1 skrev Robert Sandell:
Does Kotlin have a deprecation/compatibility policy that is compatible with Jenkins? i.e. would a plugin compiled and tested against kotlin 1.3 work with kotlin 2,3,4 etc?

If that is the case then I think a kotlin-stdlib-plugin would be the best choice.

regarding the build step, we haven't even added the groovy build step to it yet so I don't know :)

/B

2018-01-17 20:02 GMT+01:00 Joseph P <[hidden email]>:
Also there's the question of should Kotlin build steps be added to parent pom?
<a href="https://github.com/jenkinsci/plugin-pom" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fplugin-pom\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1BpmosyUu9SsMm4AppfFqlN8gFw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fplugin-pom\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1BpmosyUu9SsMm4AppfFqlN8gFw&#39;;return true;">https://github.com/jenkinsci/plugin-pom

Den onsdag den 17. januar 2018 kl. 19.56.44 UTC+1 skrev Joseph P:
Hey there,

We need to solve a problem for those wanting to use Kotlin "stdlib-jre8"
I see two solutions
  1. Create a Jenkins Kotlin plugin for Kotlin standard library.
  2. Each plugin that uses Kotlin standard library can set plugin first class loader to true.
Looking at existing Kotlin plugins.

Some decided for plugin first class loader.
<a href="https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fdoktor-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6uHEaXplXdLuSB3ObxQYB6rGU_g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fdoktor-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6uHEaXplXdLuSB3ObxQYB6rGU_g&#39;;return true;">https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts
<a href="https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcasz%2Faccurev-client-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMWtVN-WF1xaV1olL4jUVlZYG4Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcasz%2Faccurev-client-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMWtVN-WF1xaV1olL4jUVlZYG4Q&#39;;return true;">https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts
<a href="https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSimpleFinance%2Fjenkins-firebase-test-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHiVo4yfsAWP-5m3wdm536q137uSg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSimpleFinance%2Fjenkins-firebase-test-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHiVo4yfsAWP-5m3wdm536q137uSg&#39;;return true;">https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts

others are living a dangerous life:
<a href="https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmichaelsiepmann%2FJenkinsstate-Plugin%2Fblob%2Fmaster%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVy5OfEc-Hw4fFFBeemsXQ7N20xw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmichaelsiepmann%2FJenkinsstate-Plugin%2Fblob%2Fmaster%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVy5OfEc-Hw4fFFBeemsXQ7N20xw&#39;;return true;">https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle
<a href="https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkoral--%2Fandroid-gradle-jenkins-plugin%2Fblob%2Fmaster%2Fplugin%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj-1OUUaG1nZsbBQe3oIgyJfY3Ag&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkoral--%2Fandroid-gradle-jenkins-plugin%2Fblob%2Fmaster%2Fplugin%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj-1OUUaG1nZsbBQe3oIgyJfY3Ag&#39;;return true;">https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle
<a href="https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Faaron-vaz%2Fgithub-release-helper-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHh_1J7FuxhHP2bgJYMaK86-xS4ng&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Faaron-vaz%2Fgithub-release-helper-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHh_1J7FuxhHP2bgJYMaK86-xS4ng&#39;;return true;">https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts

This would hopefully help others in adopting Kotlin inside the Jenkins plugin community.

Best regards
Joseph

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees,<a href="http:///" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http:///&#39;;return true;" onclick="this.href=&#39;http:///&#39;;return true;"> Inc.
<a href="http://www.cloudbees.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cloudbees.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFD5q8pAuc6CUBHDK6LlPC4hQt3lQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cloudbees.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFD5q8pAuc6CUBHDK6LlPC4hQt3lQ&#39;;return true;">CloudBees-Logo.png
Twitter: robert_sandell

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/3097082f-44f1-4252-9da0-051513eaa666%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Joseph P
With that in mind, I will go ahead with creating a kotlin-stdlib-1-api-plugin to avoid plugins loading the incorrect major version of Kotlin.

Den torsdag den 18. januar 2018 kl. 14.57.14 UTC+1 skrev Joseph P:
I might have misread it: 

Experimental features are not backwards compatible with different minor versions.
However for the JVM

Compatibility guarantees for Kotlin releases<a href="https://kotlinlang.org/docs/reference/compatibility.html#compatibility-guarantees-for-kotlin-releases" style="color:rgb(73,123,183);display:inline-block;padding-top:5px;padding-right:8px;padding-left:8px" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fkotlinlang.org%2Fdocs%2Freference%2Fcompatibility.html%23compatibility-guarantees-for-kotlin-releases\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQmBQH7VfM8h2-ody21TXyk60xaQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fkotlinlang.org%2Fdocs%2Freference%2Fcompatibility.html%23compatibility-guarantees-for-kotlin-releases\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQmBQH7VfM8h2-ody21TXyk60xaQ&#39;;return true;">

Kotlin for JVM:

  • patch version updates (e.g. 1.1.X) are fully compatible;
  • minor version updates (e.g. 1.X) are backwards compatible.

Den torsdag den 18. januar 2018 kl. 14.54.31 UTC+1 skrev Joseph P:
This should cover the compatibility question, <a href="https://kotlinlang.org/docs/reference/compatibility.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fkotlinlang.org%2Fdocs%2Freference%2Fcompatibility.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGqbdLuDBczN0ARd11XTdSfHg03Vg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fkotlinlang.org%2Fdocs%2Freference%2Fcompatibility.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGqbdLuDBczN0ARd11XTdSfHg03Vg&#39;;return true;">https://kotlinlang.org/docs/reference/compatibility.html, seems like we would have to create a plugin for each 1.X version 😕 or we could probably do something with the compatibility modes

Seems gradle with gradle-jpi-plugin using the Kotlin Gradle DSL or groovy is the best choice then sadly gradle 4.x has issue with <a href="https://github.com/jglick/sezpoz" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjglick%2Fsezpoz\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgOVoBhy-UidVXUC7RhiTAIuN22w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjglick%2Fsezpoz\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgOVoBhy-UidVXUC7RhiTAIuN22w&#39;;return true;">sezpoz when needing to process Jenkins annotation like @Extension and so on.
Reported here <a href="https://github.com/jglick/sezpoz/issues/12" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjglick%2Fsezpoz%2Fissues%2F12\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHibxto8onC276TrA5g6SCA98_xGg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjglick%2Fsezpoz%2Fissues%2F12\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHibxto8onC276TrA5g6SCA98_xGg&#39;;return true;">https://github.com/jglick/sezpoz/issues/12
Possible fix/workaround here: <a href="https://github.com/jenkinsci/gradle-jpi-plugin/pull/97" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fgradle-jpi-plugin%2Fpull%2F97\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGbexa-Arja_3S0LfhO7aC4f7RiEg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fgradle-jpi-plugin%2Fpull%2F97\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGbexa-Arja_3S0LfhO7aC4f7RiEg&#39;;return true;">https://github.com/jenkinsci/gradle-jpi-plugin/pull/97

Den torsdag den 18. januar 2018 kl. 12.44.31 UTC+1 skrev Robert Sandell:
Does Kotlin have a deprecation/compatibility policy that is compatible with Jenkins? i.e. would a plugin compiled and tested against kotlin 1.3 work with kotlin 2,3,4 etc?

If that is the case then I think a kotlin-stdlib-plugin would be the best choice.

regarding the build step, we haven't even added the groovy build step to it yet so I don't know :)

/B

2018-01-17 20:02 GMT+01:00 Joseph P <[hidden email]>:
Also there's the question of should Kotlin build steps be added to parent pom?
<a href="https://github.com/jenkinsci/plugin-pom" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fplugin-pom\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1BpmosyUu9SsMm4AppfFqlN8gFw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fplugin-pom\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1BpmosyUu9SsMm4AppfFqlN8gFw&#39;;return true;">https://github.com/jenkinsci/plugin-pom

Den onsdag den 17. januar 2018 kl. 19.56.44 UTC+1 skrev Joseph P:
Hey there,

We need to solve a problem for those wanting to use Kotlin "stdlib-jre8"
I see two solutions
  1. Create a Jenkins Kotlin plugin for Kotlin standard library.
  2. Each plugin that uses Kotlin standard library can set plugin first class loader to true.
Looking at existing Kotlin plugins.

Some decided for plugin first class loader.
<a href="https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fdoktor-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6uHEaXplXdLuSB3ObxQYB6rGU_g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fdoktor-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6uHEaXplXdLuSB3ObxQYB6rGU_g&#39;;return true;">https://github.com/jenkinsci/doktor-plugin/blob/master/build.gradle.kts
<a href="https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcasz%2Faccurev-client-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMWtVN-WF1xaV1olL4jUVlZYG4Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcasz%2Faccurev-client-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMWtVN-WF1xaV1olL4jUVlZYG4Q&#39;;return true;">https://github.com/casz/accurev-client-plugin/blob/master/build.gradle.kts
<a href="https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSimpleFinance%2Fjenkins-firebase-test-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHiVo4yfsAWP-5m3wdm536q137uSg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSimpleFinance%2Fjenkins-firebase-test-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHiVo4yfsAWP-5m3wdm536q137uSg&#39;;return true;">https://github.com/SimpleFinance/jenkins-firebase-test-plugin/blob/master/build.gradle.kts

others are living a dangerous life:
<a href="https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmichaelsiepmann%2FJenkinsstate-Plugin%2Fblob%2Fmaster%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVy5OfEc-Hw4fFFBeemsXQ7N20xw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmichaelsiepmann%2FJenkinsstate-Plugin%2Fblob%2Fmaster%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVy5OfEc-Hw4fFFBeemsXQ7N20xw&#39;;return true;">https://github.com/michaelsiepmann/Jenkinsstate-Plugin/blob/master/build.gradle
<a href="https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkoral--%2Fandroid-gradle-jenkins-plugin%2Fblob%2Fmaster%2Fplugin%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj-1OUUaG1nZsbBQe3oIgyJfY3Ag&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkoral--%2Fandroid-gradle-jenkins-plugin%2Fblob%2Fmaster%2Fplugin%2Fbuild.gradle\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj-1OUUaG1nZsbBQe3oIgyJfY3Ag&#39;;return true;">https://github.com/koral--/android-gradle-jenkins-plugin/blob/master/plugin/build.gradle
<a href="https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Faaron-vaz%2Fgithub-release-helper-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHh_1J7FuxhHP2bgJYMaK86-xS4ng&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Faaron-vaz%2Fgithub-release-helper-plugin%2Fblob%2Fmaster%2Fbuild.gradle.kts\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHh_1J7FuxhHP2bgJYMaK86-xS4ng&#39;;return true;">https://github.com/aaron-vaz/github-release-helper-plugin/blob/master/build.gradle.kts

This would hopefully help others in adopting Kotlin inside the Jenkins plugin community.

Best regards
Joseph

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/51d5e829-d4a8-4e86-9393-47ef74088714%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees,<a href="http:///" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http:///&#39;;return true;" onclick="this.href=&#39;http:///&#39;;return true;"> Inc.
<a href="http://www.cloudbees.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cloudbees.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFD5q8pAuc6CUBHDK6LlPC4hQt3lQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cloudbees.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFD5q8pAuc6CUBHDK6LlPC4hQt3lQ&#39;;return true;">CloudBees-Logo.png
Twitter: robert_sandell

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/85d9ebcc-fefc-4b2f-a723-232ad1a8bbf9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Jesse Glick-4
In reply to this post by Joseph P
On Wed, Jan 17, 2018 at 2:02 PM, Joseph P <[hidden email]> wrote:
> should Kotlin build steps be added to parent
> pom?

Please, no. I in fact have a to-do item to *remove* the support for
Groovy compilation from the parent POM. Plugin maintainers who wish to
use alternative languages or build technologies are on their own.

In general, core maintainers have had poor experiences with plugins
using alternative JVM languages. It seems neat on the face of it, but
turns into a serious maintenance burden for the ecosystem as a whole.
In particular there have been multiple recent disasters with
(J)Ruby-based plugins and I hope to find time to propose deprecating
the entire runtime system and rewriting in Java the handful of popular
plugins using it.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0xLVe-c%3DQRP25ng4MNnVdycbZmuxB%2BK45y27m-zNdeKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Joseph P
Fair enough, if anything I would be happy to create a custom parent pom for other Kotlin based Jenkins plugins to use.

Already had to create a custom parent POM for the plugin to support Kotlin's split architecture of their standard library in jre7 and jre8

Den torsdag den 18. januar 2018 kl. 18.58.22 UTC+1 skrev Jesse Glick:
On Wed, Jan 17, 2018 at 2:02 PM, Joseph P <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ekjBpRXdAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jose...@...> wrote:
> should Kotlin build steps be added to parent
> pom?

Please, no. I in fact have a to-do item to *remove* the support for
Groovy compilation from the parent POM. Plugin maintainers who wish to
use alternative languages or build technologies are on their own.

In general, core maintainers have had poor experiences with plugins
using alternative JVM languages. It seems neat on the face of it, but
turns into a serious maintenance burden for the ecosystem as a whole.
In particular there have been multiple recent disasters with
(J)Ruby-based plugins and I hope to find time to propose deprecating
the entire runtime system and rewriting in Java the handful of popular
plugins using it.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/c354b066-9623-462d-90f4-ec254dcdf86a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Jesse Glick-4
On Thu, Jan 18, 2018 at 1:27 PM, Joseph P <[hidden email]> wrote:
> I would be happy to create a custom parent pom for
> other Kotlin based Jenkins plugins to use.

If possible, it should extend `org.jenkins-ci.plugins:plugin` so as to
pick up common stuff.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2kszEVvzYaGnAcxASnP7qbEHU1pwBtZjfFj9ZjxnTv0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using Kotlin inside Jenkins Plugins

Joseph P
Done 👍
https://github.com/casz/kotlin-v1-plugin
We use the parent POM to set Kotlin version and depend on `org.jenkins-ci.plugins:plugin` and then use the plugin pom for plugins to use.

Naming is still open for discussion tbh

I created a plugin using the Jenkins plugin archetypes and just changed the parent to the Kotlin plugin pom and BAM you could start using Kotlin 😎

Surprised how easy it was to setup with maven 👌

Den torsdag den 18. januar 2018 kl. 22.03.09 UTC+1 skrev Jesse Glick:
On Thu, Jan 18, 2018 at 1:27 PM, Joseph P <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Wr7OKyvnAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jose...@...> wrote:
> I would be happy to create a custom parent pom for
> other Kotlin based Jenkins plugins to use.

If possible, it should extend `org.jenkins-ci.plugins:plugin` so as to
pick up common stuff.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/343de5b4-326f-49a2-83b6-337f197ececc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.