Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Gradle + Java: Multiple executable within a single project

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
larienna
Posts: 107
Joined: 2014-09-27 20:54

Gradle + Java: Multiple executable within a single project

#1 Post by larienna »

I know it is possible to have multiple projects within a single or distributed build.gradle file.

What I want to know is if it's possible to generate multiple executable jar with a single gradle project?

To put you in context, I am working on some sort of library/framework and I want to supply some samples/examples with the library to show how it is used.

I could probably place each example in a gradle project of it's own. But I fear that once I'll have over 20 example projects, it might be a pain to load into netbeans. I just have 3 projects and it takes easily 30-60 seconds to load.

So I thought I could make 1 project with multiple classes that each has a main() and generate a separate jar for each class. But I am not sure if such thing is actually possible with Gradle. The only thing I could find online is the multiple projects technique.

Else if I go with the 1 project per example route, is there a way to speed up the building process. Maybe by pre-generating stuff, or by preventing it from loading all the samples at start up, etc.

Post Reply