Begin on 1.14 port

This commit is contained in:
raoulvdberge
2019-08-29 11:30:14 +02:00
parent 738ccca994
commit 41a1740d3c
9 changed files with 217 additions and 272 deletions

View File

@@ -1,137 +1,78 @@
buildscript { buildscript {
repositories { repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter() jcenter()
maven { mavenCentral()
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
} }
} }
apply plugin: 'java' apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'maven' apply plugin: 'eclipse'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'net.minecraftforge.gradle.forge'
version = "1.6.16" version = '1.7'
def env = System.getenv() group = 'com.raoulvdberge'
if (env.BUILD_NUMBER) { archivesBaseName = 'refinedstorage'
version = version + "-" + "${env.BUILD_NUMBER}"
}
group = "refinedstorage" sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
archivesBaseName = "refinedstorage"
sourceCompatibility = 1.8
targetCompatibility = 1.8
minecraft { minecraft {
version = "1.12.2-14.23.5.2838" mappings channel: 'snapshot', version: '20190719-1.14.3'
runDir = "run"
useDepAts = true
mappings = "stable_39"
replaceIn "RS.java" runs {
replace "@version@", project.version client {
} workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
mods {
refinedstorage {
source sourceSets.main
}
}
}
repositories { server {
maven { workingDirectory project.file('run')
url "http://dvs1.progwml6.com/files/maven" property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
} property 'forge.logging.console.level', 'debug'
maven { mods {
url "http://maven.cil.li" refinedstorage {
} source sourceSets.main
maven { }
name = "CurseForge" }
url = "https://minecraft.curseforge.com/api/maven/" }
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
args '--mod', 'refinedstorage', '--all', '--output', file('src/generated/resources/')
mods {
refinedstorage {
source sourceSets.main
}
}
}
} }
} }
dependencies { dependencies {
deobfCompile "mezz.jei:jei_1.12.2:4.15.0.287:api" minecraft 'net.minecraftforge:forge:1.14.4-28.0.73'
runtime "mezz.jei:jei_1.12.2:4.15.0.287"
deobfCompile "li.cil.oc:OpenComputers:MC1.12.2-1.7.2.67:api"
compile "inventory-tweaks:InventoryTweaks:1.63:api"
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
} }
jar { jar {
include "com/raoulvdberge/refinedstorage/**" manifest {
include "assets/**" attributes([
include "mcmod.info" "Specification-Title": "refinedstorage",
include "pack.mcmeta" "Specification-Vendor": "raoulvdberge",
} "Specification-Version": "1",
"Implementation-Title": project.name,
task deobfJar(type: Jar) { "Implementation-Version": "${version}",
from sourceSets.main.output "Implementation-Vendor" :"raoulvdberge",
classifier 'deobf' "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
} ])
task apiJar(type: Jar, dependsOn: 'sourceMainJava') {
from sourceSets.main.allSource
from sourceSets.main.output
include 'com/raoulvdberge/refinedstorage/api/**/*'
classifier 'api'
}
task signJar(type: SignJar, dependsOn: reobfJar) {
onlyIf {
project.hasProperty('keyStore')
}
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
}
build.dependsOn signJar
artifacts {
archives deobfJar
archives apiJar
archives sourceJar
archives jar
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = project.group
artifactId = project.archivesBaseName
version = project.version
artifact deobfJar
artifact sourceJar
artifact apiJar
artifact jar
}
}
}
publishing {
repositories {
maven {
url "/var/www/repo"
}
} }
} }

4
gradle.properties Normal file
View File

@@ -0,0 +1,4 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

Binary file not shown.

View File

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip

110
gradlew vendored
View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
############################################################################## ##############################################################################
## ##
@@ -6,47 +6,6 @@
## ##
############################################################################## ##############################################################################
# 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 # Attempt to set APP_HOME
# Resolve links: $0 may be a link # Resolve links: $0 may be a link
PRG="$0" PRG="$0"
@@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
fi fi
done done
SAVED="`pwd`" SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&- cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`" APP_HOME="`pwd -P`"
cd "$SAVED" >&- cd "$SAVED" >/dev/null
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=""
# 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
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -90,7 +89,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
@@ -114,6 +113,7 @@ fi
if $cygwin ; then if $cygwin ; 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 +154,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" "$@"

14
gradlew.bat vendored
View File

@@ -8,14 +8,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=
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=
@rem Find java.exe @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
@@ -46,10 +46,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 +59,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

View File

@@ -0,0 +1,14 @@
modLoader="javafml"
loaderVersion="[28,)"
issueTrackerURL="https://github.com/raoulvdberge/refinedstorage"
[[mods]]
modId="refinedstorage"
version="${file.jarVersion}"
displayName="Refined Storage"
updateJSONURL="https://refinedstorage.raoulvdberge.com/update"
displayURL="https://refinedstorage.raoulvdberge.com"
logoFile="assets/refinedstorage/textures/logo.png"
authors="Refined Storage authors"
description='''
An elegant solution to your hoarding problem
'''

View File

@@ -1,16 +0,0 @@
[
{
"modid": "refinedstorage",
"name": "Refined Storage",
"description": "An elegant solution to your hoarding problem",
"version": "${version}",
"mcversion": "1.12.2",
"url": "https://refinedstorage.raoulvdberge.com",
"updateUrl": "",
"authorList": ["Refined Storage contributors"],
"credits": "",
"logoFile": "assets/refinedstorage/textures/logo.png",
"screenshots": [],
"dependencies": []
}
]

View File

@@ -1,6 +1,6 @@
{ {
"pack": { "pack": {
"description": "Refined Storage resources", "description": "Refined Storage resources",
"pack_format": 3 "pack_format": 4
} }
} }