Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Groovy build.gradle example #5

Open
mkobit opened this issue Mar 15, 2018 · 2 comments
Open

Add a Groovy build.gradle example #5

mkobit opened this issue Mar 15, 2018 · 2 comments

Comments

@mkobit
Copy link
Owner

mkobit commented Mar 15, 2018

@kleini commented on Thu Mar 15 2018

I would to stay at first with Groovy DSL in build.gradle files. Can you provide an example how to use your plugin in a build.gradle file?


@mkobit commented on Thu Mar 15 2018

I think this issue is better suited for https://github.com/mkobit/jenkins-pipeline-shared-library-example - is it alright if I migrate it there?


@mkobit commented on Thu Mar 15 2018

A few notes that may be helpful


@kleini commented on Thu Mar 15 2018

You're right. Migrate it.
Thanks for your hints. I will try to get it working for me and then contribute to your examples.


@kleini commented on Thu Mar 15 2018

I already got it working. Why did my first try to reference your plugin from my build.gradle file fail? No idea. I thought it was because it was written in Kotlin. The fault sits always in front of the computer!

@mkobit mkobit changed the title Provide an example how to use this plugin without using Kotlin DSL Add a Groovy build.gradle example Mar 15, 2018
@mkobit
Copy link
Owner Author

mkobit commented Mar 15, 2018

I already got it working. Why did my first try to reference your plugin from my build.gradle file fail?

One possibility is the Gradle version, as the latest release requires Gradle 4.6. Hard to say without a build scan/stacktrace.

I'll leave this issue open for now.

Note, it may be useful to have examples of both a Groovy or Kotlin build script.

@kleini
Copy link

kleini commented Mar 15, 2018

In my case Gradle was version 4.6 and gradle tasks just showed as if the build.gradle file is completely empty. It did not notice the plugin section and the referenced plugin at all. And not error message. Hard to say, what may have caused this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants