Missed this earlier somehow...
On Tuesday, October 12, 2010, at 04:56 am, Emmanuel Bernard wrote:
1. (gradle build) the test suite shows massive failures
(3082 tests completed, 2371 failures or something along those lines) is
that expected?
That was an odd timing related issue which effected some people/machines and
not others. The underlying cause has since been fixed so you should not be
having test failures any more.
2. changing branches between a mvn style approach and a
gradle style approach or even between gradle branches
TBH I never expected this to work. And that had nothing to do with Maven
versus Gradle. Hibernate 4 will be drastically different from Hibernate 3 in
many of the same ways Hibernate 3 was different from Hibernate 2. I did not
ever expect this behavior moving from 2 -> 3, and I did not moving from 3 ->
4.
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.
See above.
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
IntelliJ does not support importing (nor therefore monitoring) of a Gradle
project.
http://youtrack.jetbrains.net/issue/IDEA-53476?projectKey=IDEA if
that is important to you.
But even if it did, I am not sure recognizing an on-the-fly switch between a
Maven-backed project and a Gradle-backed one is "on the docket" there.
Personally I do not see even remotely close to these times. I see on average
30-40 seconds to run `gradle idea`. Yes then you must resync the IntelliJ
project, which I do not have an accurate means to measure but which *feels*
like it takes another 20-30 seconds, most of which is the (re)indexing you
mention. By the way, I had the same exact reindexing happening with
IntelliJ+Maven after "reimporting".
BTW, you do not have to close/(re)open the project. Just select the root
directory and hit synchronize.
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).
See above.
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.
I actually have 2 clones. One that I use for work on 3.6 (Maven) and another
that I use for 4.x work (Gradle). Like I said, I have no problems (not the
performance issues you seem to imply anyway) switching between say master and
some topic branch I create for 4.x work.
(*) Make sure to add GRADLE_OPTS=-Xmx512m
I use the same settings I had to use for Maven. On my Linux machine I set
these up in my ~/.profile settings (which is how I am used to it from Solaris
days). I simply link that in from ~/.bashrc, though you could of course add
these directly to ~/.bashrc:
#Maven defs
export MAVEN_HOME=/opt/maven/current
export M2_HOME=$MAVEN_HOME
export MAVEN_OPTS="-Xmx1024m -Xms512m"
#Gradle defs
export GRADLE_HOME=/opt/gradle/current
export GRADLE_OPTS="-Xmx1024m -Xms512m"
"current" is another cool little trick. Its a symlink to the
"current"
install.
---
Steve Ebersole <steve(a)hibernate.org>
http://hibernate.org