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

`--package` not working with Gradle 5.0 #197

Open
abelsromero opened this Issue Dec 1, 2018 · 13 comments

Comments

Projects
None yet
4 participants
@abelsromero
Copy link

abelsromero commented Dec 1, 2018

Running the package option with gradle 5.0 installed causes it to fail with the underlying gradle message.

Gradle does not allow passing null for the configuration action for CopySpec.from()

Note that the message was captured debugging.

With gradle 4.10.2, it worked fine.

@abelsromero

This comment has been minimized.

Copy link
Author

abelsromero commented Dec 1, 2018

Seems to be a known issue with no quick solution danthegoodman/gradle-capsule-plugin#38

@holgerbrandl

This comment has been minimized.

Copy link
Owner

holgerbrandl commented Dec 4, 2018

Thanks @abelsromero for the pointer. So let's hope that they fix it soon. Not sure what to do about it on the kscript side.

@abelsromero

This comment has been minimized.

Copy link
Author

abelsromero commented Dec 4, 2018

Not sure what to do about it on the kscript side.

To keep current implementation we could "reverse engineer" the gradle plugin and directly use the capsule API.
Or just build it the package in another way, I guess that so long as we add a bootstrap script to the path and have the jars somewhere we keep the feature the same from a user stand point. It would be nice also because that way we remove the dependency from gradle.

@holgerbrandl

This comment has been minimized.

Copy link
Owner

holgerbrandl commented Dec 6, 2018

I think the best approach would be to figure out and implement a PR for the gradle-capsule-plugin which fixes the problem.

@f-meloni

This comment has been minimized.

Copy link

f-meloni commented Dec 11, 2018

Apparently there is already a PR for that
danthegoodman/gradle-capsule-plugin#39
But the problem is that gradle-capsule-plugin is no longer maintained, then could be worth evaluate remove it as dependency to avoid this kind of problems in the future.
Or maybe just fork it

@holgerbrandl

This comment has been minimized.

Copy link
Owner

holgerbrandl commented Dec 12, 2018

danthegoodman/gradle-capsule-plugin#39 seems to work only with gradle 5 and not with older gradles, otherwise I'd just fork the PR and push it to jcenter as a quickfix. But this option does not seems on the table, because at least gradle 4 should be supported by the plugin.

For sure the best solution would be to implement packaging in-process without calling an external tool. This would also remove the dependency on the capsule-gradle-plugin. Maybe capsule could be called programmatically? I would be very thankful for any help on such a feature.

Alternatively with the new bootstrap header support contributed with #199 we could also think about dropping --packaging entirely? IMHO both are a bit too different, so it may be nice to maintain both packaging modes separately.

@gianluz

This comment has been minimized.

Copy link
Contributor

gianluz commented Jan 8, 2019

@holgerbrandl

This comment has been minimized.

Copy link
Owner

holgerbrandl commented Jan 12, 2019

@gianluz Is there a new version of the gradle-capsule-plugin with these PRs merged in already which we could use instead to fix this kscript packaging?

@gianluz

This comment has been minimized.

Copy link
Contributor

gianluz commented Jan 23, 2019

i forked gradle-capsule and opened this PR gianluz/gradle-capsule-plugin#1

@gianluz

This comment has been minimized.

Copy link
Contributor

gianluz commented Jan 23, 2019

do you want to use this fork?

@holgerbrandl

This comment has been minimized.

Copy link
Owner

holgerbrandl commented Jan 23, 2019

As soon as it's published as corrected artifact on jcenter (or similar) yes.

@gianluz

This comment has been minimized.

Copy link
Contributor

gianluz commented Feb 2, 2019

I have published the new plugin, i'm just awaiting for approval, after that i'll open a PR here to fix the problem 😄

@f-meloni

This comment has been minimized.

Copy link

f-meloni commented Feb 6, 2019

@holgerbrandl Given #210 is merged, if you can please make a release, then I can check if the problem is solved :) 🎉 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment