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