]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blobdiff - build.gradle
Get 1.17.1 building
[BoundingBoxOutlineReloaded.git] / build.gradle
index 095cb593d8c3653b96c7da1f8bdd485cfcb50223..05c2fea285dff075930ea8836c8e224c2c7fe511 100644 (file)
@@ -7,7 +7,7 @@ buildscript {
         }
     }
     dependencies {
-        classpath "net.fabricmc:fabric-loom:0.2.7-SNAPSHOT"
+        classpath "net.fabricmc:fabric-loom:0.8-SNAPSHOT"
     }
 }
 
@@ -19,13 +19,24 @@ group 'com.irtimaled'
 version project.buildVersion + '-' + project.mcVersion
 archivesBaseName = 'BBOutlineReloaded'
 
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
+sourceCompatibility = JavaVersion.VERSION_16
+targetCompatibility = JavaVersion.VERSION_16
+
+tasks.withType(JavaCompile).configureEach {
+    // ensure that the encoding is set to UTF-8, no matter what the system default is
+    // this fixes some edge cases with special characters not displaying correctly
+    // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
+    // If Javadoc is generated, this must be specified in that task too.
+    it.options.encoding = "UTF-8"
+
+    // Minecraft 1.17 (21w19a) upwards uses Java 16.
+    it.options.release = 16
+}
 
 dependencies {
     minecraft 'com.mojang:minecraft:' + project.mcVersion
-    mappings 'net.fabricmc:yarn:' + project.mcVersion + '+build.27'
-    modCompile 'net.fabricmc:fabric-loader:0.9.3+build.207'
+    mappings 'net.fabricmc:yarn:' + project.mcVersion + '+build.1:v2'
+    modImplementation 'net.fabricmc:fabric-loader:0.11.6'
 }
 
 minecraft {
@@ -38,6 +49,13 @@ processResources {
     }
 }
 
+java {
+    toolchain {
+        languageVersion = JavaLanguageVersion.of(16)
+    }
+    withSourcesJar()
+}
+
 jar {
     manifest {
         attributes([