[hibernate-commits] Hibernate SVN: r19856 - core/branches/gradle2.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue Jun 29 13:22:05 EDT 2010


Author: steve.ebersole at jboss.com
Date: 2010-06-29 13:22:05 -0400 (Tue, 29 Jun 2010)
New Revision: 19856

Modified:
   core/branches/gradle2/settings.gradle
Log:
account for no ~/.gradle/gradle.properties file;
allow properties from command line (via sys-props)

Modified: core/branches/gradle2/settings.gradle
===================================================================
--- core/branches/gradle2/settings.gradle	2010-06-29 08:54:06 UTC (rev 19855)
+++ core/branches/gradle2/settings.gradle	2010-06-29 17:22:05 UTC (rev 19856)
@@ -12,8 +12,11 @@
 include 'hibernate-swarmcache'
 include 'hibernate-release'
 
-Properties properties = new Properties()
-properties.load(new FileInputStream(new File(gradle.gradleUserHomeDir, 'gradle.properties')))
+Properties properties = System.getProperties()
+File gradleDotProperties = new File(gradle.gradleUserHomeDir, 'gradle.properties')
+if ( gradleDotProperties.exists() ) {
+    properties.load( new FileInputStream( gradleDotProperties ) )
+}
 
 // handle JDK 1.5 and JDK 1.6 evaluations
 org.gradle.util.Jvm jvm = org.gradle.util.Jvm.current();



More information about the hibernate-commits mailing list