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

Dual build: With and without jre #44

Open
subwiz opened this issue May 29, 2016 · 5 comments
Open

Dual build: With and without jre #44

subwiz opened this issue May 29, 2016 · 5 comments

Comments

@subwiz
Copy link

subwiz commented May 29, 2016

I want to build both the jre-bundled and non-bundled version of my app in single build command. Now, it seems I need to edit the bundleJRE before triggering new builds.

@crotwell
Copy link
Owner

It may be possible within gradle to run a task twice with two different configurations, but I don't know how. Perhaps check the gradle docs and/or post to the gradle forum. If there is something I can change programatically to make it easier, I will consider it if you can give details of what needs to change.

@nilssonjulia
Copy link

You cannot run the same task twice in gradle https://discuss.gradle.org/t/is-there-possibility-to-run-single-task-twice-during-build-script-execution/6312.
If, for example, createApp had been a class extending DefaultTask one could easily have created tasks with createApp as type and provide the configuration needed.
My workaround for this has been to create multiple subprojects, each of them applying the plugin, configuring macappbundle and having a task buildApp. Then multiple apps can be built with
gradle buildApp.

@atistrcsn
Copy link

@crotwell I'm subscribing.
I aggree with @Codinghi, the solution would be this:

If, for example, createApp had been a class extending DefaultTask one could easily have created tasks with createApp as type and provide the configuration needed.

I am struggling with the same problem. I need to build multiple app bundle in one run.
Are you considering to refactor the tasks? 😃

@crotwell
Copy link
Owner

crotwell commented Oct 9, 2017

I am not opposed to changing createApp to extend DefaultTask. I am short on time to work on this now. Could you give the modification a try and submit a pull request?

@atistrcsn
Copy link

Gladly. I have to find some free time too, but I will definitely give it a try 👌
Thanks.

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

4 participants