Skip to content
Permalink
Browse files

Improved: Remove the Gradle wrapper from our release packages and add…

… a step to

our build notes
(OFBIZ-10145)

Applies the last waiting gradlew.bat.patch in OFBIZ-10145 
Fixes a trivial issue in Mathieu last commits: repeated "-Xms64m" in gradlew 
scripts.
Uses HTTP in init-gradle-wrapper.ps1 instead of HTTP. Not everyone has an HTTPS 
access to the tools repo.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862353 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
JacquesLeRoux committed Jun 30, 2019
1 parent 9fba501 commit 55a493c9f7c6eb7e39f2c2914a425b1dbaf0aa33
Showing with 7 additions and 11 deletions.
  1. +2 −2 gradle/init-gradle-wrapper.ps1
  2. +1 −1 gradlew
  3. +4 −8 gradlew.bat
@@ -22,5 +22,5 @@ if (! (Test-Path -Path ((Get-Item -Path ".\").FullName + "\gradle\"))) {

# This uses  PowerShell Invoke-WebRequest command (aliased as wget here)
# https is not used because we don't want users to be asked for a credential (not sure about that, maybe https is OK)
wget -outf gradle\wrapper\gradle-wrapper.jar https://svn.apache.org/repos/asf/ofbiz/tools/Buildbot/Gradle/Wrapper/trunk/gradle-wrapper.jar
wget -outf gradle\wrapper\gradle-wrapper.properties https://svn.apache.org/repos/asf/ofbiz/tools/Buildbot/Gradle/Wrapper/trunk/gradle-wrapper.properties
wget -outf gradle\wrapper\gradle-wrapper.jar http://svn.apache.org/repos/asf/ofbiz/tools/Buildbot/Gradle/Wrapper/trunk/gradle-wrapper.jar
wget -outf gradle\wrapper\gradle-wrapper.properties http://svn.apache.org/repos/asf/ofbiz/tools/Buildbot/Gradle/Wrapper/trunk/gradle-wrapper.properties
@@ -51,7 +51,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
DEFAULT_JVM_OPTS='"-Xmx64m"
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -30,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -78,16 +78,12 @@ set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem check if Gradle is installed
if exist "%CLASSPATH%" goto GradleOK

md %APP_HOME%\gradle\wrapper\
Powershell.exe -executionpolicy remotesigned -File %APP_HOME%\init-gradle-wrapper.ps1
@rem Overwrites the local Gradle Wrapper files from tools repo in all cases (it's only 55kb).
@rem This way we are sure to always use the latest version. At least when an Internet connexion is available.
Powershell.exe -executionpolicy remotesigned -File %APP_HOME%\gradle\init-gradle-wrapper.ps1

:GradleOK
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

0 comments on commit 55a493c

Please sign in to comment.
You can’t perform that action at this time.