lgrignon / jsweet-gradle-plugin

Brings the power of JSweet to Gradle
Apache License 2.0
17 stars 15 forks source link

Publishing candies to Maven repositories #13

Open sebkur opened 6 years ago

sebkur commented 6 years ago

I'm working on a number of Java projects which I would like to make available as candies. I've seen the projects from the j4ts organization, but as far as I can tell, they're all using Maven as a build system. I'm using Gradle as build system on many projects, so it would be very handy to be able to use this plugin to get things done. Usually, I'm using the uploadArchives task to upload the Java artifacts to a local Maven repository (which is then served by a webserver).

I didn't find any information about how to package and upload the transpiled files. Am I right, that this is not supported yet? Do you have any idea how this would be implemented?

I think this is a common use-case for JSweet and this plugin, so I've set up a minimal testing project to illustrate the problem and to serve as an example once it works: https://github.com/sebkur/jsweet-publishing-test

The way I currently see it, we should be able to come up with something like a jsweetUpload task, right? Any ideas on this or alternative strategies how to make existing Gradle based Java projects available as candies?

lgrignon commented 6 years ago

That's a good question, I will have a look soon. Thanks

lgrignon commented 6 years ago

I am sorry but I found no time to take a look. Would you like to contribute?

Sooner or later I will have to grant you on pushing on the JSweet candies maven repository if you want to test it.

Please tell me if you are interested in this

sebkur commented 6 years ago

My initial goal was to continue using modularization of my projects and being able to use my own libraries in JSweet projects. Publishing those libraries as JSweet candies seemed to be the natural choice.

I worked around this in the meantime by implementing a Gradle plugin (https://github.com/sebkur/gradle-dependency-unpack-plugin) which fetches the source artifacts of all declared dependencies and adds them to the set of source files to compile. The good thing is that this does not only work for JSweet, but also for GWT.

lgrignon commented 6 years ago

Ok nice. I keep this opened because this is still a good idea :)