]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blobdiff - build.gradle
Port to 1.19
[BoundingBoxOutlineReloaded.git] / build.gradle
index e8e912f083cc7125018cdacf2b6da7665ff180a5..cfe05e8dc523f83f6b653904741ee28b572a9b0b 100644 (file)
@@ -1,17 +1,23 @@
 buildscript {
     repositories {
-        jcenter()
+        mavenCentral()
         maven {
             name = 'Fabric'
             url = 'https://maven.fabricmc.net/'
         }
+        maven {
+            name = 'Cotton'
+            url = 'https://server.bbkr.space/artifactory/libs-release/'
+        }
     }
     dependencies {
-        classpath "net.fabricmc:fabric-loom:0.2.7-SNAPSHOT"
+        classpath "net.fabricmc:fabric-loom:0.11-SNAPSHOT"
+        classpath "io.github.juuxel:loom-quiltflower:1.6.0"
     }
 }
 
 apply plugin: 'fabric-loom'
+apply plugin: 'io.github.juuxel.loom-quiltflower'
 apply plugin: 'java'
 apply plugin: 'idea'
 
@@ -19,17 +25,27 @@ group 'com.irtimaled'
 version project.buildVersion + '-' + project.mcVersion
 archivesBaseName = 'BBOutlineReloaded'
 
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
+sourceCompatibility = JavaVersion.VERSION_17
+targetCompatibility = JavaVersion.VERSION_17
+
+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"
+
+    it.options.release = 17
+}
 
 dependencies {
     minecraft 'com.mojang:minecraft:' + project.mcVersion
-    mappings 'net.fabricmc:yarn:' + project.mcVersion + '+build.9'
-    modCompile 'net.fabricmc:fabric-loader:0.8.3+build.196'
+    mappings 'net.fabricmc:yarn:' + project.mcVersion + '+build.1:v2'
+    modImplementation 'net.fabricmc:fabric-loader:0.13.3'
 }
 
-minecraft {
-    refmapName = 'mixins.bbor.refmap.json'
+loom {
+    accessWidenerPath = file("src/main/resources/bbor.accesswidener")
 }
 
 processResources {
@@ -38,6 +54,13 @@ processResources {
     }
 }
 
+java {
+    toolchain {
+        languageVersion = JavaLanguageVersion.of(17)
+    }
+    withSourcesJar()
+}
+
 jar {
     manifest {
         attributes([
@@ -56,3 +79,9 @@ jar {
 afterEvaluate {
     remapJar.classifier = 'fabric'
 }
+
+afterEvaluate {
+    migrateMappings.configure {
+        outputDir = project.file("src/main/java")
+    }
+}