lgrignon / jsweet-gradle-plugin

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

Upgrading transpiler #4

Closed mb720 closed 8 years ago

mb720 commented 8 years ago

Hi and thanks for your great plugin!

I'm trying to upgrade to jsweet-transpiler 1.2.0-SNAPSHOT by editing the line in build.gradle of my jsweet-examples fork to

compile group: 'org.jsweet', name: 'jsweet-transpiler', version: "1.2.0" + project.dependenciesVersionSuffix

But this doesn't seem to have any effect since the generated TypeScript files still show

"Generated from Java with JSweet 1.1.0-SNAPSHOT - http://www.jsweet.org"

1.1.0-SNAPSHOT happens to be the version used by the JSweet Gradle plugin and I was wondering whether the plugin's transpiler version overrides any version of the project using the plugin.

Is there a way to set the transpiler's version in, for example, jsweet-examples?

lgrignon commented 8 years ago

Thanks for your feedback. Yes, you are absolutely right, we should use the client's project transpiler instead of the jsweet-gradle-plugin's declared one.

A similar issue was raised in the following thread and we chose not to do it: https://github.com/lgrignon/jsweet-gradle-plugin/pull/2

But since the transpiler in now pretty stable, options are less willing to change in every release. So yeah, I thinks it's time, thanks ;) I will take a look ASAP. Probably right now :)

lgrignon commented 8 years ago

Probably applies to maven plugin as well, I will raise an issue. NB @mb720 if you want to contribute you could try applying it to the gradle plugin (and then PR) while I do the maven plugin. What do you think?

mb720 commented 8 years ago

Hi Louis!

Do you want me to fork the JSweet Gradle plugin, bump the transpiler's version to 1.2.0-SNAPSHOT, and then create a pull request?

lgrignon commented 8 years ago

Hi, I rather proposed that you try to make the gradle plugin use the transpiler declared in the hosting project. I tried yesterday to do it in the maven plugin and so far I am stuck with some class loader issue.

If you want to contribute, feel free to try to adapt the gradle plugin in order to depend on the transpiler version declared in the hosting project instead of the one declared in the gradle plugin . Thanks

renaudpawlak commented 8 years ago

Maybe it is not possible or quite difficult. We still don't know how to do it with the Maven plugin :( So, do not spend too much time trying to do it because updating the version is really easy and can be done in seconds.

mb720 commented 8 years ago

Alright, I see.

I'm not sure when I get around to work on this, but here is something on getting the dependencies of a project from a custom plugin: Link.

sadevelopment commented 8 years ago

In the meantime could you just update it to 1.2.0-SNAPSHOT so I can remove my local build here?

lgrignon commented 8 years ago

Please PR it, I will merge, I have really no time today. I will see later for a long term solution. Thanks :)

sadevelopment commented 8 years ago

Did 1.2.0 snapshot get released in the end?

lgrignon commented 8 years ago

Yes, jsweet-gradle-plugin uses 1.2.0-SNAPSHOT version of the transpiler since the last commit. I PRed the examples to update the plugin's version. It should be merged soon. Thanks for your feedbacks