mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-26 14:35:04 -04:00
update build
This commit is contained in:
parent
2687fb13c5
commit
4f5d0cc3bc
206
build.gradle
206
build.gradle
@ -19,6 +19,14 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'idea'
|
||||||
|
id 'scala'
|
||||||
|
id("org.ajoberstar.grgit") version("3.1.1")
|
||||||
|
id("com.github.johnrengelman.shadow") version("4.0.4")
|
||||||
|
id("com.palantir.git-version") version("0.12.3")
|
||||||
|
}
|
||||||
|
|
||||||
apply plugin: 'scala'
|
apply plugin: 'scala'
|
||||||
apply plugin: 'forge'
|
apply plugin: 'forge'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
@ -27,75 +35,47 @@ tasks.withType(ScalaCompile) {
|
|||||||
scalaCompileOptions.additionalParameters = ["-deprecation:false"]
|
scalaCompileOptions.additionalParameters = ["-deprecation:false"]
|
||||||
}
|
}
|
||||||
|
|
||||||
file "build.properties" withReader {
|
|
||||||
def prop = new Properties()
|
|
||||||
prop.load(it)
|
|
||||||
ext.config = new ConfigSlurper().parse prop
|
|
||||||
}
|
|
||||||
|
|
||||||
version = "${config.oc.version}"
|
|
||||||
group = "li.cil.oc"
|
|
||||||
archivesBaseName = "OpenComputers"
|
|
||||||
|
|
||||||
def getGitRef() {
|
|
||||||
try {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
return stdout.toString().trim()
|
|
||||||
} catch (Throwable e) {
|
|
||||||
return "unknown"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (System.getenv("PROMOTED_NUMBER") != null)
|
|
||||||
version += ".${System.getenv("PROMOTED_NUMBER")}"
|
|
||||||
else if (System.getenv("BUILD_NUMBER") != null)
|
|
||||||
version += ".${System.getenv("BUILD_NUMBER")}"
|
|
||||||
else
|
|
||||||
version += "+" + getGitRef()
|
|
||||||
|
|
||||||
ext.simpleVersion = version
|
|
||||||
version = "MC${config.minecraft.version}-${project.version}"
|
|
||||||
|
|
||||||
runClient {
|
|
||||||
jvmArgs '-Dfml.coreMods.load=li.cil.oc.common.launch.TransformerLoader'
|
|
||||||
}
|
|
||||||
runServer {
|
|
||||||
jvmArgs '-Dfml.coreMods.load=li.cil.oc.common.launch.TransformerLoader'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (JavaVersion.current().isJava8Compatible()) {
|
|
||||||
allprojects {
|
|
||||||
tasks.withType(Javadoc) {
|
|
||||||
options.addStringOption('Xdoclint:none', '-quiet')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = "mightypirates"
|
name = "mightypirates"
|
||||||
url = "https://maven.cil.li/"
|
url = "https://maven.cil.li/"
|
||||||
|
metadataSources {
|
||||||
|
mavenPom()
|
||||||
|
artifact()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// These are necessary because some parts of the maven repo is weirdly structured, this needs to be fixed.
|
// These are necessary because some parts of the maven repo is weirdly structured, this needs to be fixed.
|
||||||
ivy {
|
ivy {
|
||||||
name 'weird maven repos'
|
name 'weird maven repos'
|
||||||
artifactPattern "https://maven.cil.li/[module]/[revision]/[module]-[revision].[ext]"
|
artifactPattern "https://maven.cil.li/[module]/[revision]/[module]-[revision].[ext]"
|
||||||
|
metadataSources {
|
||||||
|
ivyDescriptor()
|
||||||
|
artifact()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ivy {
|
ivy {
|
||||||
name 'weird maven repos 2'
|
name 'weird maven repos 2'
|
||||||
artifactPattern "https://maven.cil.li/[module]/[revision]/[module]-[revision]-[classifier].[ext]"
|
artifactPattern "https://maven.cil.li/[module]/[revision]/[module]-[revision]-[classifier].[ext]"
|
||||||
|
metadataSources {
|
||||||
|
ivyDescriptor()
|
||||||
|
artifact()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name "Mobius Repo"
|
name "Mobius Repo"
|
||||||
url "http://mobiusstrip.eu/maven"
|
url "http://mobiusstrip.eu/maven"
|
||||||
|
metadataSources {
|
||||||
|
mavenPom()
|
||||||
|
artifact()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = "ic2"
|
name = "ic2"
|
||||||
url = "https://maven.ic2.player.to/"
|
url = "https://maven.ic2.player.to/"
|
||||||
|
metadataSources {
|
||||||
|
mavenPom()
|
||||||
|
artifact()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = "gt"
|
name = "gt"
|
||||||
@ -122,63 +102,121 @@ repositories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
group = "li.cil.oc"
|
||||||
embedded
|
archivesBaseName = "OpenComputers"
|
||||||
implementation.extendsFrom embedded
|
|
||||||
|
// Define properties file
|
||||||
|
ext.configFile = file "build.properties"
|
||||||
|
|
||||||
|
configFile.withReader {
|
||||||
|
// Load config. It shall from now be referenced as simply config or project.config
|
||||||
|
def prop = new Properties()
|
||||||
|
prop.load(it)
|
||||||
|
project.ext.config = new ConfigSlurper().parse prop
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly "appeng:RotaryCraft:${config.rotc.version}:api"
|
compileOnly ("appeng:RotaryCraft:${project.config.rotc_version}:api") {
|
||||||
|
transitive = false
|
||||||
|
}
|
||||||
compileOnly "com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev"
|
compileOnly "com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev"
|
||||||
compileOnly "com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev"
|
compileOnly "com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev"
|
||||||
compileOnly "com.github.GTNewHorizons:EnderStorage:master-SNAPSHOT:dev"
|
compileOnly "com.github.GTNewHorizons:EnderStorage:master-SNAPSHOT:dev"
|
||||||
compileOnly "com.github.GTNewHorizons:Waila:master-SNAPSHOT:dev"
|
compileOnly "com.github.GTNewHorizons:Waila:master-SNAPSHOT:dev"
|
||||||
compileOnly "com.github.GTNewHorizons:ForgeMultipart:master-SNAPSHOT:dev"
|
compileOnly "com.github.GTNewHorizons:ForgeMultipart:master-SNAPSHOT:dev"
|
||||||
compileOnly "codechicken:WR-CBE:${config.minecraft.version}-${config.wrcbe.version}:dev"
|
compileOnly "com.github.GTNewHorizons:GT5-Unofficial:master-SNAPSHOT:dev"
|
||||||
compileOnly "com.bluepowermod:BluePower:${config.bluepower.version}:deobf"
|
compileOnly "com.github.GTNewHorizons:ForestryMC:master-SNAPSHOT:dev"
|
||||||
compileOnly "com.gregoriust.gregtech:gregtech:${config.gt.version}:dev"
|
compileOnly ("com.github.GTNewHorizons:Galacticraft:master-SNAPSHOT:dev") {
|
||||||
compileOnly "igwmod:IGW-Mod-1.7.10:${config.igwmod.version}:userdev"
|
transitive = false
|
||||||
compileOnly "li.cil.tis3d:TIS-3D:${config.tis3d.version}:dev"
|
}
|
||||||
compileOnly "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
|
compileOnly "com.github.GTNewHorizons:Railcraft:master-SNAPSHOT:dev"
|
||||||
compileOnly "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:dev"
|
compileOnly "com.github.GTNewHorizons:ThaumicEnergistics:master-SNAPSHOT:dev"
|
||||||
compileOnly "dev.modwarriors.notenoughkeys:NotEnoughKeys:${config.minecraft.version}-${config.nek.version}:deobf-dev"
|
compileOnly "com.github.GTNewHorizons:ExtraCells2:master-SNAPSHOT:dev"
|
||||||
compileOnly "qmunity:QmunityLib:${config.qmunitylib.version}:deobf"
|
compileOnly "com.github.GTNewHorizons:EnderIO:master-SNAPSHOT:dev"
|
||||||
compileOnly "tmech:TMechworks:${config.minecraft.version}-${config.tmech.version}:deobf"
|
compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
|
||||||
compileOnly ("mrtjp:ProjectRed:${config.projred.version}:dev") {
|
compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
|
||||||
|
compileOnly "curse.maven:mekanism-268560:2475797" //mekanism - not needed in gtnh, won't build without
|
||||||
|
compileOnly "codechicken:WR-CBE:${project.config.minecraft_version}-${project.config.wrcbe_version}:dev"
|
||||||
|
compileOnly "com.bluepowermod:BluePower:${project.config.bluepower.version}:deobf"
|
||||||
|
compileOnly "igwmod:IGW-Mod-1.7.10:${project.config.igwmod.version}:userdev"
|
||||||
|
compileOnly "li.cil.tis3d:TIS-3D:${project.config.tis3d.version}:dev"
|
||||||
|
compileOnly "net.industrial-craft:industrialcraft-2:${project.config.ic2.version}:dev"
|
||||||
|
compileOnly "dev.modwarriors.notenoughkeys:NotEnoughKeys:${project.config.minecraft_version}-${project.config.nek.version}:deobf-dev"
|
||||||
|
compileOnly "qmunity:QmunityLib:${project.config.qmunitylib.version}:deobf"
|
||||||
|
compileOnly "tmech:TMechworks:${project.config.minecraft_version}-${project.config.tmech.version}:deobf"
|
||||||
|
compileOnly ("mrtjp:ProjectRed:${project.config.projred.version}:dev") {
|
||||||
exclude module: 'CoFHCore'
|
exclude module: 'CoFHCore'
|
||||||
}
|
}
|
||||||
// compileOnly "coloredlightscore:ColoredLightsCore:${config.coloredlights.version}:api"
|
compileOnly name: 'redlogic', version: project.config.redlogic.version, ext: 'jar'
|
||||||
|
compileOnly name: 'MineFactoryReloaded', version: project.config.mfr.version, ext: 'jar'
|
||||||
|
compileOnly name: 'ComputerCraft', version: project.config.cc.version, ext: 'jar'
|
||||||
|
compileOnly name: 'BloodMagic', version: project.config.bloodmagic.version, ext: 'jar'
|
||||||
|
|
||||||
compileOnly name: 'buildcraft', version: config.bc.version, classifier: "dev", ext: 'jar'
|
implementation 'com.google.code.findbugs:jsr305:1.3.9' // Annotations used by google libs.
|
||||||
compileOnly name: 'GalacticraftCoreAll', version: config.gc.version, ext: 'jar'
|
|
||||||
compileOnly name: 'MekanismAll', version: config.mekanism.version, ext: 'jar'
|
|
||||||
compileOnly name: 'redlogic', version: config.redlogic.version, ext: 'jar'
|
|
||||||
|
|
||||||
compileOnly name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
|
//embedded files('libs/OpenComputers-JNLua.jar', 'libs/OpenComputers-LuaJ.jar')
|
||||||
compileOnly name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
|
|
||||||
compileOnly name: 'MineFactoryReloaded', version: config.mfr.version, ext: 'jar'
|
|
||||||
compileOnly name: 'ComputerCraft', version: config.cc.version, ext: 'jar'
|
|
||||||
compileOnly name: 'EnderIO', version: config.eio.version, ext: 'jar'
|
|
||||||
compileOnly name: 'Railcraft', version: config.rc.version, ext: 'jar'
|
|
||||||
compileOnly name: 'BloodMagic', version: config.bloodmagic.version, ext: 'jar'
|
|
||||||
compileOnly name: 'ExtraCells', version: config.ec.version, ext: 'jar'
|
|
||||||
compileOnly name: 'ThaumicEnergistics', version: config.thaumicenergistics.version, ext: 'jar'
|
|
||||||
compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
|
|
||||||
|
|
||||||
compile 'com.google.code.findbugs:jsr305:1.3.9' // Annotations used by google libs.
|
|
||||||
|
|
||||||
embedded files('libs/OpenComputers-JNLua.jar', 'libs/OpenComputers-LuaJ.jar')
|
|
||||||
|
|
||||||
testCompile "org.mockito:mockito-all:1.10.19"
|
testCompile "org.mockito:mockito-all:1.10.19"
|
||||||
testCompile "org.scalactic:scalactic_2.11:2.2.6"
|
testCompile "org.scalactic:scalactic_2.11:2.2.6"
|
||||||
testCompile "org.scalatest:scalatest_2.11:2.2.6"
|
testCompile "org.scalatest:scalatest_2.11:2.2.6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
version = "${project.config.mod_version}" ?: "1"
|
||||||
|
|
||||||
|
println config.minecraft_version + "-" + config.forge_version
|
||||||
|
|
||||||
|
def getGitRef() {
|
||||||
|
try {
|
||||||
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
return stdout.toString().trim()
|
||||||
|
} catch (Throwable e) {
|
||||||
|
return "unknown"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (System.getenv("PROMOTED_NUMBER") != null)
|
||||||
|
version += ".${System.getenv("PROMOTED_NUMBER")}"
|
||||||
|
else if (System.getenv("BUILD_NUMBER") != null)
|
||||||
|
version += ".${System.getenv("BUILD_NUMBER")}"
|
||||||
|
else
|
||||||
|
version += "+" + getGitRef()
|
||||||
|
|
||||||
|
ext.simpleVersion = version
|
||||||
|
version = "MC${config.minecraft_version}-${project.version}"
|
||||||
|
|
||||||
|
def root = project.projectDir.parentFile
|
||||||
|
|
||||||
|
runClient {
|
||||||
|
jvmArgs '-Dfml.coreMods.load=li.cil.oc.common.launch.TransformerLoader'
|
||||||
|
}
|
||||||
|
runServer {
|
||||||
|
jvmArgs '-Dfml.coreMods.load=li.cil.oc.common.launch.TransformerLoader'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (JavaVersion.current().isJava8Compatible()) {
|
||||||
|
allprojects {
|
||||||
|
tasks.withType(Javadoc) {
|
||||||
|
options.addStringOption('Xdoclint:none', '-quiet')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
embedded
|
||||||
|
implementation.extendsFrom embedded
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "${config.minecraft.version}-${config.forge.version}"
|
version = config.minecraft_version + "-" + config.forge_version + "-" + config.minecraft_version
|
||||||
|
|
||||||
replace "@VERSION@", project.simpleVersion
|
replace "@VERSION@", project.simpleVersion
|
||||||
replace "/*@MCVERSIONDEP@*/", ", acceptedMinecraftVersions = \"[${config.minecraft.version},${config.minecraft.version}+)\""
|
//replace "/*@MCVERSIONDEP@*/", ", acceptedMinecraftVersions = \"[${config.minecraft.version},${config.minecraft.version}+)\""
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
minecraft.version=1.7.10
|
minecraft_version=1.7.10
|
||||||
forge.version=10.13.4.1614-1.7.10
|
forge_version=10.13.4.1614
|
||||||
|
mod_version=1.7.5.16-GTNH
|
||||||
oc.version=1.7.5.16-GTNH
|
rotc_version=V5c
|
||||||
|
wrcbe_version=1.4.1.2
|
||||||
ae2.version=rv3-beta-31
|
ae2.version=rv3-beta-31
|
||||||
bc.version=7.0.9
|
bc.version=7.0.9
|
||||||
bloodmagic.cf=2223/203
|
bloodmagic.cf=2223/203
|
||||||
@ -24,30 +24,20 @@ fmp.version=1.1.0.308
|
|||||||
forestry.version=4.4.0.0
|
forestry.version=4.4.0.0
|
||||||
gc.build=3
|
gc.build=3
|
||||||
gc.version=3.0.7
|
gc.version=3.0.7
|
||||||
gt.version=5.09.33.52
|
|
||||||
ic2.version=2.2.828-experimental
|
ic2.version=2.2.828-experimental
|
||||||
igwmod.version=1.1.3-18
|
igwmod.version=1.1.3-18
|
||||||
mekanism.build=5
|
mekanism.build=5
|
||||||
mekanism.version=7.1.2
|
mekanism.version=7.1.2
|
||||||
mfr.cf=2229/626
|
mfr.cf=2229/626
|
||||||
mfr.version=[1.7.10]2.8.0RC8-86
|
mfr.version=[1.7.10]2.8.0RC8-86
|
||||||
nei.version=1.0.3.57
|
|
||||||
nek.version=2.0.0b4
|
nek.version=2.0.0b4
|
||||||
projred.version=1.7.10-4.6.2.82
|
projred.version=1.7.10-4.6.2.82
|
||||||
qmunitylib.version=0.1.105
|
qmunitylib.version=0.1.105
|
||||||
rc.cf=2219/321
|
rc.cf=2219/321
|
||||||
rc.version=1.7.10-9.4.0.0
|
rc.version=1.7.10-9.4.0.0
|
||||||
redlogic.version=59.0.3
|
redlogic.version=59.0.3
|
||||||
rotc.version=V5c
|
|
||||||
thaumicenergistics.cf=2277/520
|
|
||||||
thaumicenergistics.version=1.0.0.1-RV2
|
|
||||||
tis3d.version=MC1.7.10-1.2.4.70
|
tis3d.version=MC1.7.10-1.2.4.70
|
||||||
tmech.version=75.0afb56c
|
tmech.version=75.0afb56c
|
||||||
re.version=3.0.0.342
|
re.version=3.0.0.342
|
||||||
waila.version=1.5.10
|
|
||||||
wrcbe.version=1.4.1.2
|
|
||||||
cofhcore.cf=2246/697
|
cofhcore.cf=2246/697
|
||||||
cofhcore.version=[1.7.10]3.0.3B4-302-dev
|
cofhcore.version=[1.7.10]3.0.3B4-302-dev
|
||||||
|
|
||||||
curse.project.id=223008
|
|
||||||
curse.project.releaseType=release
|
|
||||||
|
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,5 @@
|
|||||||
#Fri Mar 07 00:48:03 EST 2014
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
|
|
||||||
|
94
gradlew
vendored
94
gradlew
vendored
@ -1,4 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed 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
|
||||||
|
#
|
||||||
|
# https://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.
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
@ -6,12 +22,30 @@
|
|||||||
##
|
##
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Attempt to set APP_HOME
|
||||||
DEFAULT_JVM_OPTS=""
|
# 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\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=`basename "$0"`
|
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"'
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD="maximum"
|
||||||
|
|
||||||
@ -30,6 +64,7 @@ die ( ) {
|
|||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
case "`uname`" in
|
case "`uname`" in
|
||||||
CYGWIN* )
|
CYGWIN* )
|
||||||
cygwin=true
|
cygwin=true
|
||||||
@ -40,31 +75,11 @@ case "`uname`" in
|
|||||||
MINGW* )
|
MINGW* )
|
||||||
msys=true
|
msys=true
|
||||||
;;
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
esac
|
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
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@ -90,7 +105,7 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
@ -110,10 +125,11 @@ if $darwin; then
|
|||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if $cygwin ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
@ -154,11 +170,19 @@ if $cygwin ; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
# Escape application args
|
||||||
function splitJvmOpts() {
|
save () {
|
||||||
JVM_OPTS=("$@")
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
}
|
}
|
||||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
APP_ARGS=$(save "$@")
|
||||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
|
||||||
|
|
||||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
|
30
gradlew.bat
vendored
30
gradlew.bat
vendored
@ -1,3 +1,19 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@ -8,14 +24,14 @@
|
|||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@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=-Xmx1G -XX:MaxPermSize=256M
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
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"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
@ -46,10 +62,9 @@ echo location of your Java installation.
|
|||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
:init
|
||||||
@rem Get command-line arguments, handling Windowz variants
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
@ -60,11 +75,6 @@ set _SKIP=2
|
|||||||
if "x%~1" == "x" goto execute
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
goto execute
|
|
||||||
|
|
||||||
:4NT_args
|
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
|
||||||
set CMD_LINE_ARGS=%$
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user