Browse Source

Update to gradle3 and need to fix unchecked warnings

OvermindDL1 1 year ago
parent
commit
f23877110e
5 changed files with 28 additions and 25 deletions
  1. 11
    10
      build.gradle
  2. BIN
      gradle/wrapper/gradle-wrapper.jar
  3. 2
    2
      gradle/wrapper/gradle-wrapper.properties
  4. 15
    7
      gradlew
  5. 0
    6
      gradlew.bat

+ 11
- 10
build.gradle View File

@@ -15,10 +15,9 @@ buildscript {
15 15
 	}
16 16
 }
17 17
 
18
-// Because Forge is too stupid to fix Deprecation Issues, and we cannot fix it on our end! (until we fork Forge)
19 18
 allprojects {
20 19
 	tasks.withType(JavaCompile) {
21
-		options.compilerArgs << "-Xlint:deprecation"
20
+		options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
22 21
 	}
23 22
 }
24 23
 
@@ -53,13 +52,15 @@ task eclipseForgeWorkspace(type: Copy) {
53 52
 }
54 53
 
55 54
 import org.apache.tools.ant.taskdefs.condition.Os
56
-task eclipseForgeProject << {
57
-	if(!(new File("eclipse/Minecraft")).exists()) {
58
-		if(!Os.isFamily(Os.FAMILY_WINDOWS)) {
59
-			ant.symlink(resource: "../", link: "eclipse/Minecraft")
60
-		} else {
61
-			println("WINDOWS:  Before loading this workspace with Eclipse, manually run this in an Elevated/Admin command prompt:")
62
-			println("mklink /D " + (new File("").absolutePath) + "/eclipse/Minecraft " + (new File("").absolutePath))
55
+task eclipseForgeProject {
56
+	doLast {
57
+		if(!(new File("eclipse/Minecraft")).exists()) {
58
+			if(!Os.isFamily(Os.FAMILY_WINDOWS)) {
59
+				ant.symlink(resource: "../", link: "eclipse/Minecraft")
60
+			} else {
61
+				println("WINDOWS:  Before loading this workspace with Eclipse, manually run this in an Elevated/Admin command prompt:")
62
+				println("mklink /D " + (new File("").absolutePath) + "/eclipse/Minecraft " + (new File("").absolutePath))
63
+			}
63 64
 		}
64 65
 	}
65 66
 }
@@ -191,7 +192,7 @@ processResources {
191 192
 }
192 193
 
193 194
 task wrapper(type: Wrapper) {
194
-	gradleVersion = '2.14.1'
195
+	gradleVersion = '3.5.1'
195 196
 }
196 197
 
197 198
 jar {

BIN
gradle/wrapper/gradle-wrapper.jar View File


+ 2
- 2
gradle/wrapper/gradle-wrapper.properties View File

@@ -1,6 +1,6 @@
1
-#Tue Sep 18 14:32:10 MDT 2018
1
+#Fri Sep 21 11:31:02 MDT 2018
2 2
 distributionBase=GRADLE_USER_HOME
3 3
 distributionPath=wrapper/dists
4 4
 zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip

+ 15
- 7
gradlew View File

@@ -1,4 +1,4 @@
1
-#!/usr/bin/env bash
1
+#!/usr/bin/env sh
2 2
 
3 3
 ##############################################################################
4 4
 ##
@@ -154,11 +154,19 @@ if $cygwin ; then
154 154
     esac
155 155
 fi
156 156
 
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 " "
160 161
 }
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 163
 
164
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
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"
166
+
167
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169
+  cd "$(dirname "$0")"
170
+fi
171
+
172
+exec "$JAVACMD" "$@"

+ 0
- 6
gradlew.bat View File

@@ -49,7 +49,6 @@ goto fail
49 49
 @rem Get command-line arguments, handling Windows variants
50 50
 
51 51
 if not "%OS%" == "Windows_NT" goto win9xME_args
52
-if "%@eval[2+2]" == "4" goto 4NT_args
53 52
 
54 53
 :win9xME_args
55 54
 @rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
60 59
 if "x%~1" == "x" goto execute
61 60
 
62 61
 set CMD_LINE_ARGS=%*
63
-goto execute
64
-
65
-:4NT_args
66
-@rem Get arguments from the 4NT Shell from JP Software
67
-set CMD_LINE_ARGS=%$
68 62
 
69 63
 :execute
70 64
 @rem Setup the command line

Loading…
Cancel
Save