]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blob - build.gradle
Port to 1.19
[BoundingBoxOutlineReloaded.git] / build.gradle
1 buildscript {
2     repositories {
3         mavenCentral()
4         maven {
5             name = 'Fabric'
6             url = 'https://maven.fabricmc.net/'
7         }
8         maven {
9             name = 'Cotton'
10             url = 'https://server.bbkr.space/artifactory/libs-release/'
11         }
12     }
13     dependencies {
14         classpath "net.fabricmc:fabric-loom:0.11-SNAPSHOT"
15         classpath "io.github.juuxel:loom-quiltflower:1.6.0"
16     }
17 }
18
19 apply plugin: 'fabric-loom'
20 apply plugin: 'io.github.juuxel.loom-quiltflower'
21 apply plugin: 'java'
22 apply plugin: 'idea'
23
24 group 'com.irtimaled'
25 version project.buildVersion + '-' + project.mcVersion
26 archivesBaseName = 'BBOutlineReloaded'
27
28 sourceCompatibility = JavaVersion.VERSION_17
29 targetCompatibility = JavaVersion.VERSION_17
30
31 tasks.withType(JavaCompile).configureEach {
32     // ensure that the encoding is set to UTF-8, no matter what the system default is
33     // this fixes some edge cases with special characters not displaying correctly
34     // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
35     // If Javadoc is generated, this must be specified in that task too.
36     it.options.encoding = "UTF-8"
37
38     it.options.release = 17
39 }
40
41 dependencies {
42     minecraft 'com.mojang:minecraft:' + project.mcVersion
43     mappings 'net.fabricmc:yarn:' + project.mcVersion + '+build.1:v2'
44     modImplementation 'net.fabricmc:fabric-loader:0.13.3'
45 }
46
47 loom {
48     accessWidenerPath = file("src/main/resources/bbor.accesswidener")
49 }
50
51 processResources {
52     filesMatching('fabric.mod.json') {
53         expand version: project.version
54     }
55 }
56
57 java {
58     toolchain {
59         languageVersion = JavaLanguageVersion.of(17)
60     }
61     withSourcesJar()
62 }
63
64 jar {
65     manifest {
66         attributes([
67                 "Main-Class": "com.irtimaled.bbor.Main",
68                 "Specification-Title": "bbor",
69                 "Specification-Vendor": "Irtimaled",
70                 "Specification-Version": "1", // We are version 1 of ourselves
71                 "Implementation-Title": project.name,
72                 "Implementation-Version": "${version}",
73                 "Implementation-Vendor": "Irtimaled",
74                 "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
75         ])
76     }
77 }
78
79 afterEvaluate {
80     remapJar.classifier = 'fabric'
81 }
82
83 afterEvaluate {
84     migrateMappings.configure {
85         outputDir = project.file("src/main/java")
86     }
87 }