[hibernate-dev] Fwd: [Hibernate-JIRA] Closed: (HHH-5616) Switch to Gradle for builds
Emmanuel Bernard
emmanuel at hibernate.org
Tue Oct 12 05:56:57 EDT 2010
I've played with master and gradle this morning. So far so good. I have two issues though:
1. (gradle build) the test suite shows massive failures (3082 tests completed, 2371 failures or something along those lines) is that expected?
2. changing branches between a mvn style approach and a gradle style approach or even between gradle branches
One super awesome feature of the combo Idea + Maven POM's + Git was the ability to move from one branch to another (even with a different pom structure) and be ready to work after 10 to 20s max. Idea was detecting the pom structure changes (new modules or not) and was refreshing the project structure on the fly and and off we go.
With Gradle, this kind of support does not seem to exist. The closest I have found is to run gradle idea with takes between 1min30 and OOME(*) assuming all deps are downloaded already. On top of that Idea goes wacko so you have to close and reopen the project in Idea which with reindexing easily takes another 2 mins 30
It gets more complicated when switching between branches that use different build tools (mvn and gradle).
When moving from Gradle to mvn, the IDE of course does not remember it has to react to pom files and the fastest solution is to reimport from scratch which means a good 3 minutes (I tried mvn idea:idea but it did not seem to create a working project on me).
Does anyone has a better/faster workflow? I have to admit, I will miss a lot the instant branching, that helped me to be massively more productive.
Emmanuel
(*) Make sure to add GRADLE_OPTS=-Xmx512m
On 12 oct. 2010, at 03:58, Steve Ebersole wrote:
> I should have pointed out some of the basic commands you'll commonly need.
> All these can be found in the Gradle User Guide:
> http://www.gradle.org/0.9-rc-1/docs/userguide/userguide_single.html
>
> Most of the stuff we are interested in comes from the Java plugin:
> http://www.gradle.org/0.9-
> rc-1/docs/userguide/userguide_single.html#java_plugin
>
> Here is a list of the ones you will currently be using (from any project in
> gradle you can get a list of available tasks by executing `gradle -t`):
>
> 1) build - Assembles (jars) and tests this project.
> 2) buildDependents - Assembles and tests this project and all projects that
> depend on it. So think of running this in hibernnate-entitymanager.. Gradle
> would assemble and test hibernate-entitymanager as well as hibernate-envers
> (because envers depends on entitymanager).
> 3) classes - compiles the main classes
> 4) clean - Deletes the build directory.
> 5) jar - Generates a jar archive with all the compiled classes.
> 6) testClasses - Assembles the test classes.
> 7) test - Runs the unit tests
> 8) uploadArchives - think Maven deploy
>
> Especially those of you developing Search, Validator, etc should know about an
> additional task:
> 9) install - installs the project jar to your local maven cache (aka
> ~/,m2/repository)
>
> In the root project you can perform any task and Gradle will attempt to
> perform it on each subproject.
>
> That should be enough to get you going.
>
> Oh and you can also execute multiple tasks:
> `gradle clean build` runs both the clean and build tasks
>
> On Monday, October 11, 2010 05:45:29 pm Steve Ebersole wrote:
>> I have switched HEAD of hibernate-core to use Gradle for builds. I still
>> need to finish up some tasks, but they mostly deal with the release
>> process for which I created a follow-up issue.
>>
>> You can either install Gradle and use the gradle command, or you can use
>> "gradle wrapper" by using the ./gradlew (or ./gradlew.bat files for our
>> Windows friends).
>>
>> ---------- Forwarded Message ----------
>>
>> Subject: [Hibernate-JIRA] Closed: (HHH-5616) Switch to Gradle for builds
>> Date: Monday, October 11, 2010, 04:46:57 pm
>> From: "Steve Ebersole (JIRA)" <noreply at atlassian.com>
>> To: steve at hibernate.org
>>
>>
>> [
>> http://opensource.atlassian.com/projects/hibernate/browse/HHH-5616?page=com
>> .atlassian.jira.plugin.system.issuetabpanels:all- tabpanel ]
>>
>> Steve Ebersole closed HHH-5616.
>> -------------------------------
>>
>> Resolution: Fixed
>>
>>> Switch to Gradle for builds
>>> ---------------------------
>>>
>>> Key: HHH-5616
>>
>>> URL:
>> http://opensource.atlassian.com/projects/hibernate/browse/HHH-5616
>>
>>> Project: Hibernate Core
>>>
>>> Issue Type: Task
>>> Components: core
>>>
>>> Reporter: Steve Ebersole
>>> Assignee: Steve Ebersole
>>>
>>> Fix For: 4.0.0.Alpha1
>>>
>>> Time Spent: 23h
>>>
>>> Remaining Estimate: 0h
>>>
>>> http://gradle.org
>
> --
> Steve Ebersole <steve at hibernate.org>
> http://hibernate.org
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list