Skip to content

Commit 70d16e4

Browse files
committed
Updage Forge Version - 14.23.5.2768 -> 14.23.5.2854
1 parent 3caf54a commit 70d16e4

File tree

6 files changed

+116
-58
lines changed

6 files changed

+116
-58
lines changed

build.gradle

Lines changed: 100 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1+
import org.apache.tools.ant.filters.ReplaceTokens
2+
13
buildscript {
24
repositories {
5+
maven { url = 'https://files.minecraftforge.net/maven' }
36
jcenter()
4-
maven { url = "http://files.minecraftforge.net/maven" }
7+
mavenCentral()
58
}
69
dependencies {
7-
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
10+
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
811
}
912
}
10-
apply plugin: 'net.minecraftforge.gradle.forge'
11-
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
13+
14+
15+
apply plugin: 'net.minecraftforge.gradle'
16+
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
17+
apply plugin: 'eclipse'
18+
apply plugin: 'maven-publish'
1219

1320
file "build.properties" withReader {
1421
def prop = new Properties()
@@ -23,67 +30,117 @@ archivesBaseName = "SmartMoving"
2330
ext.simpleVersion = version
2431
version = "${config.minecraft.version}-${project.version}"
2532

26-
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
27-
compileJava {
28-
sourceCompatibility = targetCompatibility = '1.8'
33+
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
34+
35+
task updateVersion(type: Copy) {
36+
from('src')
37+
{
38+
exclude 'mcmod.info'
39+
}
40+
into 'build/sources/java'
41+
filter(ReplaceTokens, tokens: [VERSION: project.version.toString()])
2942
}
3043

31-
compileJava.options.encoding = 'UTF-8'
44+
compileJava.dependsOn updateVersion
45+
compileJava.source = 'build/sources/java'
3246

33-
tasks.withType(JavaCompile) {
34-
options.encoding = 'UTF-8'
35-
}
47+
minecraft {
48+
mappings channel: 'snapshot', version: '20171003-1.12'
49+
50+
runs {
51+
client {
52+
workingDirectory project.file('run')
53+
54+
// Recommended logging data for a userdev environment
55+
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
56+
57+
// Recommended logging level for the console
58+
property 'forge.logging.console.level', 'debug'
3659

37-
configurations {
38-
provided
39-
embedded
40-
compile.extendsFrom provided, embedded
60+
// Force-load Player API in dev workspace
61+
property 'fml.coreMods.load', 'api.player.forge.RenderPlayerAPIPlugin,api.player.forge.PlayerAPIPlugin'
62+
}
63+
64+
server {
65+
66+
// Recommended logging data for a userdev environment
67+
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
68+
69+
// Recommended logging level for the console
70+
property 'forge.logging.console.level', 'debug'
71+
72+
// Force-load Player API in dev workspace
73+
property 'fml.coreMods.load', 'api.player.forge.RenderPlayerAPIPlugin,api.player.forge.PlayerAPIPlugin'
74+
}
75+
}
4176
}
4277

4378
dependencies {
44-
provided files("libs/RenderPlayerAPI-1.12.2-1.0.jar")
79+
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
80+
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
81+
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
82+
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2854'
83+
84+
implementation files('libs/RenderPlayerAPI-1.12.2-1.0.jar')
4585
compile project(":PlayerAPI")
4686
compile project(":SmartRender")
47-
}
4887

49-
minecraft {
50-
version = "${config.minecraft.version}-${config.forge.version}"
51-
runDir = "run"
52-
53-
// the mappings can be changed at any time, and must be in the following format.
54-
// snapshot_YYYYMMDD snapshot are built nightly.
55-
// stable_# stables are built at the discretion of the MCP team.
56-
// Use non-default mappings at your own risk. they may not always work.
57-
// simply re-run your setup task after changing the mappings to update your workspace.
58-
mappings = "${config.minecraft.mappings}"
59-
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
60-
61-
replace "@VERSION@", project.simpleVersion
88+
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
89+
// http://www.gradle.org/docs/current/userguide/dependency_management.html
90+
6291
}
6392

93+
// Example for how to get properties into the manifest for reading by the runtime..
6494
jar {
65-
configurations.embedded.each { dep ->
66-
from(project.zipTree(dep)) {
67-
exclude 'META-INF', 'META-INF/**'
68-
}
95+
manifest {
96+
attributes([
97+
"Specification-Title": "smartmoving",
98+
"Specification-Vendor": "doch13_",
99+
"Specification-Version": "1", // We are version 1 of ourselves
100+
"Implementation-Title": project.name,
101+
"Implementation-Version": "${version}",
102+
"Implementation-Vendor" :"doch13_",
103+
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
104+
])
69105
}
70106
}
71107

72108
processResources {
109+
// this will ensure that this task is redone when the versions change.
110+
inputs.property "version", project.version
111+
inputs.property "mcversion", "${config.minecraft.version}-${config.forge.version}"
112+
113+
// replace stuff in mcmod.info, nothing else
73114
from(sourceSets.main.resources.srcDirs) {
74115
include 'mcmod.info'
75-
expand 'version': project.simpleVersion, 'mcversion': config.minecraft.version
116+
117+
// replace version and mcversion
118+
expand 'version':project.simpleVersion, 'mcversion':config.minecraft.version
76119
}
77-
120+
121+
// copy everything else except the mcmod.info
78122
from(sourceSets.main.resources.srcDirs) {
79-
include 'application.conf'
80-
filter { line ->
81-
line.replaceAll("@VERSION@", project.simpleVersion)
123+
exclude 'mcmod.info'
124+
}
125+
}
126+
127+
// Example configuration to allow publishing using the maven-publish task
128+
// This is the preferred method to reobfuscate your jar file
129+
jar.finalizedBy('reobfJar')
130+
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
131+
//publish.dependsOn('reobfJar')
132+
133+
publishing {
134+
publications {
135+
mavenJava(MavenPublication) {
136+
artifact jar
82137
}
83138
}
84-
85-
from(sourceSets.main.resources.srcDirs) {
86-
exclude 'mcmod.info'
87-
exclude 'application.conf'
139+
repositories {
140+
maven {
141+
url "file:///${project.projectDir}/mcmodsrepo"
142+
}
88143
}
89144
}
145+
146+
sourceSets { main { output.resourcesDir = output.classesDir } }

build.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
minecraft.version=1.12.2
2-
minecraft.mappings=snapshot_20171003
3-
forge.version=14.23.5.2768
42
smartmoving.version=17.0-RC3

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
22
# This is required to provide enough memory for the Minecraft decompilation process.
33
org.gradle.jvmargs=-Xmx3G -Dfile.encoding=UTF-8
4-
systemProp.file.encoding=UTF-8
4+
systemProp.file.encoding=UTF-8
5+
org.gradle.daemon=false

gradle/wrapper/gradle-wrapper.jar

1.85 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jan 22 17:35:41 KST 2021
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip

gradlew

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
##############################################################################
44
##
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"
3535

36-
warn ( ) {
36+
warn () {
3737
echo "$*"
3838
}
3939

40-
die ( ) {
40+
die () {
4141
echo
4242
echo "$*"
4343
echo
@@ -154,16 +154,19 @@ if $cygwin ; then
154154
esac
155155
fi
156156

157-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158-
function splitJvmOpts() {
159-
JVM_OPTS=("$@")
157+
# Escape application args
158+
save () {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
160161
}
161-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162+
APP_ARGS=$(save "$@")
163+
164+
# Collect all arguments for the java command, following the shell quoting and substitution rules
165+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
163166

164167
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
165-
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
168+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
166169
cd "$(dirname "$0")"
167170
fi
168171

169-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
172+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)