Removed build.xml, added the gradle wrapper to the repo
This commit is contained in:
parent
6090aa688e
commit
7b93d4d579
4 changed files with 170 additions and 336 deletions
336
build.xml
336
build.xml
|
@ -1,336 +0,0 @@
|
|||
<project name="Biomes O Plenty" basedir="./" default="build">
|
||||
<property environment="env" />
|
||||
<property file="buildspecs.properties" prefix="buildspecs" />
|
||||
|
||||
<property name="mod.minecraftversion" value="1" />
|
||||
<property name="mod.majorversion" value="1" />
|
||||
<property name="mod.tweakversion" value="3" />
|
||||
<property name="mod.version" value="${mod.minecraftversion}.${mod.majorversion}.${mod.tweakversion}" />
|
||||
<condition property="mod.build" value="${env.BUILD_NUMBER}" else="0">
|
||||
<isset property="env.BUILD_NUMBER" />
|
||||
</condition>
|
||||
<property name="mc.version" value="1.6.4" />
|
||||
<property name="forge.version" value="9.11.1.952" />
|
||||
<property name="ccc.version" value="0.9.0.7" />
|
||||
<property name="worldcore.version" value="1.1.0.17" />
|
||||
<property name="fmp.version" value="1.0.0.182" />
|
||||
|
||||
<property name="src.dir" value="" />
|
||||
<property name="build.dir" value="build" />
|
||||
<property name="download.dir" value="download" />
|
||||
<property name="dist.dir" value="dist" />
|
||||
<property name="forge.dir" value="${build.dir}/forge" />
|
||||
<property name="fmp.dir" value="${build.dir}/fmp" />
|
||||
<property name="ccc.dir" value="${build.dir}/ccc" />
|
||||
<property name="worldcore.dir" value="${build.dir}/worldcore" />
|
||||
<property name="mcp.dir" value="${forge.dir}/mcp" />
|
||||
|
||||
<property name="mod.name" value="BiomesOPlenty-universal-${mc.version}-${mod.version}.${mod.build}.jar" />
|
||||
<property name="dev.name" value="BiomesOPlenty-dev-${mc.version}-${mod.version}.${mod.build}.jar" />
|
||||
<property name="api.name" value="BiomesOPlenty-api-${mc.version}-${mod.version}.${mod.build}.zip" />
|
||||
<property name="changelog.name" value="BiomesOPlenty-changelog-${mc.version}-${mod.version}.${mod.build}.txt" />
|
||||
|
||||
<property name="forge.name" value="minecraftforge-src-${mc.version}-${forge.version}.zip" />
|
||||
<property name="ccc.name" value="CodeChickenCore-dev%20${ccc.version}.jar" />
|
||||
<property name="worldcore.name" value="WorldCore-dev-${mc.version}-${worldcore.version}.jar" />
|
||||
<property name="fmp.name" value="ForgeMultipart-dev-${mc.version}-${fmp.version}.jar" />
|
||||
|
||||
|
||||
<!-- Check downloaded dependencies -->
|
||||
<available property="forge-downloaded" file="${download.dir}/${forge.name}" />
|
||||
<available property="ccc-downloaded" file="${download.dir}/${ccc.name}" />
|
||||
<available property="worldcore-downloaded" file="${download.dir}/${worldcore.name}" />
|
||||
<available property="fmp-downloaded" file="${download.dir}/${fmp.name}" />
|
||||
|
||||
<!-- Check installed dependencies -->
|
||||
<property name="build.dependencies.file" value="${build.dir}/dependencies.properties" />
|
||||
<property prefix="build.dependencies" file="${build.dependencies.file}" />
|
||||
<condition property="forge-installed">
|
||||
<equals arg1="${build.dependencies.forge}" arg2="${forge.version}" />
|
||||
</condition>
|
||||
<condition property="fmp-installed">
|
||||
<and>
|
||||
<isset property="forge-installed" />
|
||||
<equals arg1="${build.dependencies.fmp}" arg2="${fmp.version}" />
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="worldcore-installed">
|
||||
<and>
|
||||
<isset property="forge-installed" />
|
||||
<equals arg1="${build.dependencies.worldcore}" arg2="${worldcore.version}" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<!-- Make directories -->
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${download.dir}" />
|
||||
<mkdir dir="${dist.dir}" />
|
||||
|
||||
|
||||
<!-- Targets for downloading dependencies -->
|
||||
<target name="download-forge" unless="forge-downloaded">
|
||||
<get src="http://files.minecraftforge.net/${forge.name}" dest="${download.dir}" usetimestamp="true" />
|
||||
</target>
|
||||
|
||||
<target name="download-ccc" unless="ccc-downloaded">
|
||||
<get src="http://www.chickenbones.craftsaddle.org/Files/New_Versions/${mc.version}/${ccc.name}" dest="${download.dir}" usetimestamp="true" />
|
||||
</target>
|
||||
|
||||
<target name="download-worldcore" unless="worldcore-downloaded">
|
||||
<get src="http://files.minecraftforge.net/WorldCore/${worldcore.name}" dest="${download.dir}" usetimestamp="true" />
|
||||
</target>
|
||||
|
||||
<target name="download-fmp" unless="fmp-downloaded">
|
||||
<get src="http://files.minecraftforge.net/ForgeMultipart/${fmp.name}" dest="${download.dir}" usetimestamp="true" />
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Targets for installing dependencies -->
|
||||
<target name="install-forge" depends="download-forge" unless="forge-installed">
|
||||
<echo message="Deleting old Forge" />
|
||||
<delete dir="${forge.dir}" />
|
||||
|
||||
<condition property="installargs" value=" --no-assets" else="">
|
||||
<or>
|
||||
<isset property="env.BUILD_ID" />
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<echo message="Installing Forge with args '${installargs}'." />
|
||||
<unzip src="${download.dir}/${forge.name}" dest="${forge.dir}/.." />
|
||||
<property name="fml.python.exe" location="${forge.dir}/fml/python/python_fml.exe" />
|
||||
<exec dir="${forge.dir}" executable="${fml.python.exe}" osfamily="windows" failonerror="true">
|
||||
<arg line="install.py${installargs}" />
|
||||
</exec>
|
||||
<exec dir="${forge.dir}" executable="python" osfamily="unix" failonerror="true">
|
||||
<arg line="install.py${installargs}" />
|
||||
</exec>
|
||||
|
||||
<echo message="Updating build.dependencies" />
|
||||
<delete file="${build.dependencies.file}" />
|
||||
<propertyfile file="${build.dependencies.file}">
|
||||
<entry key="forge" value="${forge.version}" />
|
||||
</propertyfile>
|
||||
</target>
|
||||
|
||||
<target name="install-ccc" depends="install-forge,download-ccc" unless="ccc-installed">
|
||||
<echo message="Deleting old CodeChickenCore" />
|
||||
<delete file="${mcp.dir}/lib/${build.dependencies.ccc.name}" />
|
||||
|
||||
<echo message="Installing CodeChickenCore" />
|
||||
<copy file="${download.dir}/${ccc.name}" todir="${mcp.dir}/lib" />
|
||||
<unzip src="${download.dir}/${ccc.name}" dest="${ccc.dir}">
|
||||
<patternset>
|
||||
<include name="**/*.class" />
|
||||
</patternset>
|
||||
</unzip>
|
||||
|
||||
|
||||
<echo message="Updating build.dependencies" />
|
||||
<propertyfile file="${build.dependencies.file}">
|
||||
<entry key="ccc" value="${ccc.version}" />
|
||||
<entry key="ccc.name" value="${ccc.name}" />
|
||||
</propertyfile>
|
||||
</target>
|
||||
|
||||
<target name="install-worldcore" depends="download-worldcore" unless="worldcore-installed">
|
||||
<echo message="Deleting old WorldCore" />
|
||||
<delete file="${mcp.dir}/lib/${build.dependencies.worldcore.name}" />
|
||||
<delete dir="${fmp.dir}" />
|
||||
|
||||
<echo message="Installing WorldCore" />
|
||||
<copy file="${download.dir}/${worldcore.name}" todir="${mcp.dir}/lib" />
|
||||
<unzip src="${download.dir}/${worldcore.name}" dest="${worldcore.dir}">
|
||||
<patternset>
|
||||
<include name="**/*.class" />
|
||||
</patternset>
|
||||
</unzip>
|
||||
|
||||
<echo message="Updating build.dependencies" />
|
||||
<propertyfile file="${build.dependencies.file}">
|
||||
<entry key="worldcore" value="${worldcore.version}" />
|
||||
<entry key="worldcore.name" value="${worldcore.name}" />
|
||||
</propertyfile>
|
||||
</target>
|
||||
|
||||
<target name="install-fmp" depends="download-fmp" unless="fmp-installed">
|
||||
<echo message="Deleting old ForgeMultipart" />
|
||||
<delete file="${mcp.dir}/lib/${build.dependencies.fmp.name}" />
|
||||
<delete dir="${fmp.dir}" />
|
||||
|
||||
<echo message="Installing ForgeMultipart" />
|
||||
<copy file="${download.dir}/${fmp.name}" todir="${mcp.dir}/lib" />
|
||||
<unzip src="${download.dir}/${fmp.name}" dest="${fmp.dir}">
|
||||
<patternset>
|
||||
<include name="**/*.class" />
|
||||
</patternset>
|
||||
</unzip>
|
||||
|
||||
<echo message="Updating build.dependencies" />
|
||||
<propertyfile file="${build.dependencies.file}">
|
||||
<entry key="fmp" value="${fmp.version}" />
|
||||
<entry key="fmp.name" value="${fmp.name}" />
|
||||
</propertyfile>
|
||||
</target>
|
||||
|
||||
<target name="install-dependencies" depends="install-forge,install-worldcore,install-fmp,install-ccc" />
|
||||
|
||||
<!-- Targets for building -->
|
||||
<target name="recompile">
|
||||
|
||||
<!-- Copy source -->
|
||||
<echo message="Copying source" />
|
||||
<copy todir="${mcp.dir}/src/minecraft">
|
||||
<fileset dir="common" />
|
||||
</copy>
|
||||
<copy todir="${mcp.dir}/src/minecraft">
|
||||
<fileset dir="apis" />
|
||||
</copy>
|
||||
<copy todir="${mcp.dir}/reobf/resources">
|
||||
<fileset dir="resources" />
|
||||
</copy>
|
||||
|
||||
<!-- Replace Tokens-->
|
||||
<replace dir="${mcp.dir}/src/minecraft/biomesoplenty" token="@VERSION@" value="${mod.version}" />
|
||||
<replace dir="${mcp.dir}/src/minecraft/biomesoplenty" token="@BUILD_NUMBER@" value="${mod.build}" />
|
||||
<replace dir="${mcp.dir}/src/minecraft/biomesoplenty" token="@MC_VERSION@" value="${mc.version}" />
|
||||
<replace dir="${mcp.dir}/src/minecraft/biomesoplenty" token="1.42.666.42.1" value="9.10.1.871" />
|
||||
|
||||
<replace dir="${mcp.dir}/reobf/resources" token="@VERSION@" value="${mod.version}" />
|
||||
<replace dir="${mcp.dir}/reobf/resources" token="@BUILD_NUMBER@" value="${mod.build}" />
|
||||
<replace dir="${mcp.dir}/reobf/resources" token="@MC_VERSION@" value="${mc.version}" />
|
||||
<replace dir="${mcp.dir}/reobf/resources" token="@FORGE_VERSION@" value="${forge.version}" />
|
||||
<replace dir="${mcp.dir}/reobf/resources" token="@WORLDCORE_VERSION@" value="${worldcore.version}" />
|
||||
|
||||
<replace dir="" token="@BUILD_NUMBER@" value="${mod.build}" />
|
||||
|
||||
<echo message="Recompiling" />
|
||||
<property name="mcp.python.exe" location="${mcp.dir}/runtime/bin/python/python_mcp.exe" />
|
||||
<exec dir="${mcp.dir}" executable="${mcp.python.exe}" osfamily="windows" resultproperty="recompile.code">
|
||||
<arg line="runtime/recompile.py" />
|
||||
</exec>
|
||||
<exec dir="${mcp.dir}" executable="python" osfamily="unix" resultproperty="recompile.code">
|
||||
<arg line="runtime/recompile.py" />
|
||||
</exec>
|
||||
|
||||
<echo message="Removing source" />
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${mcp.dir}/src/minecraft">
|
||||
<present present="both" targetdir="common" />
|
||||
<present present="both" targetdir="apis" />
|
||||
</fileset>
|
||||
</delete>
|
||||
|
||||
<fail message="Failed to recompile">
|
||||
<condition>
|
||||
<isfailure code="${recompile.code}" />
|
||||
</condition>
|
||||
</fail>
|
||||
</target>
|
||||
|
||||
<target name="reobfuscate">
|
||||
<echo message="Copying ForgeMultipart" />
|
||||
<copy todir="${mcp.dir}/bin/minecraft">
|
||||
<fileset dir="${fmp.dir}" />
|
||||
</copy>
|
||||
|
||||
<echo message="Copying WorldCore" />
|
||||
<copy todir="${mcp.dir}/bin/minecraft">
|
||||
<fileset dir="${worldcore.dir}" />
|
||||
</copy>
|
||||
|
||||
<echo message="Copying CodeChickenCore" />
|
||||
<copy todir="${mcp.dir}/bin/minecraft">
|
||||
<fileset dir="${ccc.dir}" />
|
||||
</copy>
|
||||
|
||||
<echo message="Reobfuscating" />
|
||||
<property name="mcp.python.exe" location="${mcp.dir}/runtime/bin/python/python_mcp.exe" />
|
||||
<exec dir="${mcp.dir}" executable="${mcp.python.exe}" osfamily="windows" resultproperty="reobfuscate.code">
|
||||
<arg line="runtime/reobfuscate.py --srgnames" />
|
||||
</exec>
|
||||
<exec dir="${mcp.dir}" executable="python" osfamily="unix" resultproperty="reobfuscate.code">
|
||||
<arg line="runtime/reobfuscate.py --srgnames" />
|
||||
</exec>
|
||||
|
||||
<echo message="Removing ForgeMultipart" />
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${mcp.dir}/bin/minecraft">
|
||||
<present present="both" targetdir="${fmp.dir}" />
|
||||
</fileset>
|
||||
<fileset dir="${mcp.dir}/reobf/minecraft">
|
||||
<present present="both" targetdir="${fmp.dir}" />
|
||||
</fileset>
|
||||
</delete>
|
||||
|
||||
<echo message="Removing WorldCore" />
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${mcp.dir}/bin/minecraft">
|
||||
<present present="both" targetdir="${worldcore.dir}" />
|
||||
</fileset>
|
||||
<fileset dir="${mcp.dir}/reobf/minecraft">
|
||||
<present present="both" targetdir="${worldcore.dir}" />
|
||||
</fileset>
|
||||
</delete>
|
||||
|
||||
<echo message="Removing CodeChickenCore" />
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${mcp.dir}/bin/minecraft">
|
||||
<present present="both" targetdir="${ccc.dir}" />
|
||||
</fileset>
|
||||
<fileset dir="${mcp.dir}/reobf/minecraft">
|
||||
<present present="both" targetdir="${ccc.dir}" />
|
||||
</fileset>
|
||||
</delete>
|
||||
|
||||
<echo message="Copying DepLoader.class from CCC" />
|
||||
<copy todir="${mcp.dir}/reobf/minecraft/codechicken/core/launch/">
|
||||
<fileset dir="${ccc.dir}/codechicken/core/launch/" includes="DepLoader*.class" />
|
||||
</copy>
|
||||
|
||||
<fail message="Failed to reobfuscate">
|
||||
<condition>
|
||||
<isfailure code="${reobfuscate.code}" />
|
||||
</condition>
|
||||
</fail>
|
||||
</target>
|
||||
|
||||
<target name="package">
|
||||
<echo message="Building Jar" />
|
||||
<mkdir dir="${dist.dir}" />
|
||||
|
||||
<echo message="Packaging BiomesOPlenty Universal" />
|
||||
<jar destfile="${dist.dir}/${mod.name}" manifest="${mcp.dir}/reobf/resources/MANIFEST.MF">
|
||||
<fileset dir="${mcp.dir}/reobf/minecraft" includes="**/biomesoplenty/**, codechicken/core/launch/DepLoader**" />
|
||||
<fileset dir="${mcp.dir}/reobf/resources" excludes="MANIFEST.MF">
|
||||
</fileset>
|
||||
</jar>
|
||||
|
||||
<copy todir="tmp/src">
|
||||
<fileset dir="${mcp.dir}/src/minecraft" includes="**/biomesoplenty/**"/>
|
||||
</copy>
|
||||
|
||||
<echo message="Packaging BiomesOPlenty Dev" />
|
||||
<jar destfile="${dist.dir}/${dev.name}" manifest="${mcp.dir}/reobf/resources/MANIFEST.MF">
|
||||
<fileset dir="tmp" includes="**/src/**" />
|
||||
<fileset dir="${mcp.dir}/bin/minecraft" includes="**/biomesoplenty/**, codechicken/core/launch/DepLoader**" />
|
||||
<fileset dir="${mcp.dir}/reobf/resources" excludes="MANIFEST.MF">
|
||||
</fileset>
|
||||
</jar>
|
||||
|
||||
<echo message="Packaging BiomesOPlenty Api" />
|
||||
<zip destfile="${dist.dir}/${api.name}">
|
||||
<fileset dir="${mcp.dir}/src/minecraft" includes="**/biomesoplenty/api/**" />
|
||||
</zip>
|
||||
|
||||
<echo message="Renaming BiomesOPlenty Changelog" />
|
||||
<move file="changelog.txt" tofile="${dist.dir}/${changelog.name}"/>
|
||||
</target>
|
||||
|
||||
<target name="build">
|
||||
<antcall target="install-dependencies" />
|
||||
<antcall target="recompile" />
|
||||
<antcall target="reobfuscate" />
|
||||
<antcall target="package" />
|
||||
</target>
|
||||
</project>
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Executable file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Executable file
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
Executable file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Executable file
|
@ -0,0 +1,6 @@
|
|||
#Wed Oct 09 10:24:07 CDT 2013
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
|
164
gradlew
vendored
Executable file
164
gradlew
vendored
Executable file
|
@ -0,0 +1,164 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
Loading…
Reference in a new issue