-
Notifications
You must be signed in to change notification settings - Fork 38
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
com.github.jruby-gradle.base 2.0.0 not working when use kotlin DSL #407
Comments
The way this plugin configures the gems repository is a bit of a convoluted IMO and uses internals of Gradle from what I can tell. This just does not play nice with the Kotlin DSL. import com.github.jrubygradle.api.core.RepositoryHandlerExtension
val repositoriesInternal = repositories as ExtensionAware
repositoriesInternal.extensions.configure(RepositoryHandlerExtension::class) {
gems()
} This likely stems from the wide support of Gradle version judging from:
You can confirm this yourself by printing the class: println(repositories::class)
// class org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler_Decorated The Javadoc for
So the "fix" from to get this plugin to nicely with the Kotlin DSL:
I do not know enough about this plugin to say those two points are accurate. I wanted to use Asciidoctor Diagram and went down a rabbit hole trying to figure out how to configure it which led me here since our projects use Kotlin DSL. cc @ysb33r |
Thanks for raising this! There is a lot of older code that needs clean up in these plugins and it will only happen if people find issues 😸 |
However, you should have had no need to go down to |
Well, to my understanding of Gradle's codebase, |
While it would probably be nice if the plugin provides a repositories {
this as ExtensionAware
the<RepositoryHandlerExtension>().gems()
} Disclaimer: this is untested as I don't use ruby, but it should work fine. |
And using
How would I add the gems? Below code
|
Yes, that just works. |
That's because you are using the legacy way to apply the plugin. |
If I add the jruby to the plugins block like |
Ok, fixed, thanks, you were right, I was mixing new with legacy way :) |
I found that using
Breaks the release build.
Any input? |
I configed like this:
but i get an error
Unresolved reference: ruby
The text was updated successfully, but these errors were encountered: