GROOVY-8378: Gradle wrapper bootstrapping should be more independent of the 
Gradle version used for bootstrapping


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/bdb058dd
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/bdb058dd
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/bdb058dd

Branch: refs/heads/GROOVY_2_6_X
Commit: bdb058dd83a732d82cc5c481347286f4a9e1d65e
Parents: 76e9405
Author: paulk <[email protected]>
Authored: Tue Nov 14 13:52:14 2017 +1000
Committer: paulk <[email protected]>
Committed: Tue Nov 14 13:56:07 2017 +1000

----------------------------------------------------------------------
 README.adoc           |  7 +++++--
 build.gradle          |  3 +--
 gradle.properties     | 25 +++++++++++--------------
 gradle/wrapper.gradle | 21 ---------------------
 wrapper.gradle        | 21 +++++++++++++++++++++
 5 files changed, 38 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/bdb058dd/README.adoc
----------------------------------------------------------------------
diff --git a/README.adoc b/README.adoc
index cde8b30..f2e1876 100644
--- a/README.adoc
+++ b/README.adoc
@@ -80,7 +80,7 @@ As mentioned in the previous paragraph, if you download the 
source distribution
 you need to bootstrap Gradle. This isn't needed if you clone from the Github 
repo.
 
 Each version of Groovy is built and tested using a specific version of Gradle.
-That version is specified by the `gradleVersion` property defined in the 
`build.gradle`
+That version is specified by the `gradle_version` property defined in the 
`gradle.properties`
 file within the root directory. Luckily you shouldn't need to know that 
version and,
 after bootstrapping, you should use the `gradlew` command which will ensure the
 correct version is always used.
@@ -91,9 +91,12 @@ expecting.
 
 To bootstrap Gradle, at the top directory of your unpacked source, run the 
command:
 
-    gradle wrapper
+    gradle -b wrapper.gradle wrapper
 
 On Unix-like systems, use `./gradle`.
+If the version of Gradle you have installed is close to the required version,
+you might be able to get away without the `-b wrapper.gradle` above, but if in
+doubt leave it in.
 
 *NOTE*: At this point, the Gradle wrapper should be set up and from now on you 
should use
 the `gradlew` command instead of `gradle`. (On Unix-like systems, use 
`./gradlew`).

http://git-wip-us.apache.org/repos/asf/groovy/blob/bdb058dd/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index e6b13b7..499fc37 100644
--- a/build.gradle
+++ b/build.gradle
@@ -167,7 +167,6 @@ ext {
     commonsHttpClientVersion = '3.1'
     eclipseOsgiVersion = '3.9.1-v20140110-1610'
     gparsVersion = '1.2.1'
-    gradleVersion = '3.5.1'
     ivyVersion = '2.4.0'
     jansiVersion = '1.13'
     jarjarVersion = '1.4.1'
@@ -381,7 +380,7 @@ task ensureGrammars {
 }
 
 apply from: 'gradle/utils.gradle'
-apply from: 'gradle/wrapper.gradle'
+apply from: 'wrapper.gradle'
 
 task dgmConverter(dependsOn:compileJava) {
     description = 'Generates DGM info file required for faster startup.'

http://git-wip-us.apache.org/repos/asf/groovy/blob/bdb058dd/gradle.properties
----------------------------------------------------------------------
diff --git a/gradle.properties b/gradle.properties
index 23641fa..cbaede3 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -17,23 +17,20 @@ groovyVersion = 2.6.0-SNAPSHOT
 # bundle version format: major('.'minor('.'micro('.'qualifier)?)?)? (first 3 
only digits)
 groovyBundleVersion = 2.6.0.SNAPSHOT
 
-groovyJUnit_ms = 256m
-groovyJUnit_mx = 512m
-groovyJUnit_permSize = 64m
-groovyJUnit_maxPermSize = 192m
+gradle_version=3.5.1
 
-javacMain_mx = 384m
-groovycMain_mx = 384m
-groovycTest_mx = 640m
-groovycExamples_mx = 384m
+groovyJUnit_ms=512m
+groovyJUnit_mx=1g
+groovyJUnit_permSize=64m
+groovyJUnit_maxPermSize=256m
 
-javaDoc_mx = 640m
+javacMain_mx=512m
+groovycMain_mx=1g
+groovycTest_mx=1g
+
+javaDoc_mx=1g
 
 # jdk 9
 #org.gradle.jvmargs=-ea -Xmx1G
 # jdk 6-8
-org.gradle.jvmargs=-Xmx1G -XX:MaxPermSize=384m -XX:+CMSClassUnloadingEnabled 
-XX:+CMSPermGenSweepingEnabled
-
-# Property below not currently used for gradle build. It was used in the Ant 
build by forking a JVM instance using
-# this property which then called the real groovyDoc Ant task. For now setting 
JAVA_OPTS globally is the workaround.
-#groovyDoc_mx = 600m
+org.gradle.jvmargs=-Xms800m -Xmx1500m -XX:MaxPermSize=512m 
-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

http://git-wip-us.apache.org/repos/asf/groovy/blob/bdb058dd/gradle/wrapper.gradle
----------------------------------------------------------------------
diff --git a/gradle/wrapper.gradle b/gradle/wrapper.gradle
deleted file mode 100644
index 208277a..0000000
--- a/gradle/wrapper.gradle
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-tasks.withType(Wrapper) {
-    gradleVersion = project.gradleVersion
-}

http://git-wip-us.apache.org/repos/asf/groovy/blob/bdb058dd/wrapper.gradle
----------------------------------------------------------------------
diff --git a/wrapper.gradle b/wrapper.gradle
new file mode 100644
index 0000000..235b061
--- /dev/null
+++ b/wrapper.gradle
@@ -0,0 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+tasks.withType(Wrapper) {
+    gradleVersion = gradle_version
+}

Reply via email to