]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blob - build.gradle
eba553db66e82b7b23057de1d94e761a0d8a2e23
[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.29'
39     modImplementation 'net.fabricmc:fabric-loader:0.11.6'
40 }
41
42 loom {
43     accessWidener "src/main/resources/bbor.accesswidener"
44 }
45
46 minecraft {
47     refmapName = 'mixins.bbor.refmap.json'
48 }
49
50 processResources {
51     filesMatching('fabric.mod.json') {
52         expand version: project.version
53     }
54 }
55
56 java {
57     toolchain {
58         languageVersion = JavaLanguageVersion.of(16)
59     }
60     withSourcesJar()
61 }
62
63 jar {
64     manifest {
65         attributes([
66                 "Main-Class": "com.irtimaled.bbor.Main",
67                 "Specification-Title": "bbor",
68                 "Specification-Vendor": "Irtimaled",
69                 "Specification-Version": "1", // We are version 1 of ourselves
70                 "Implementation-Title": project.name,
71                 "Implementation-Version": "${version}",
72                 "Implementation-Vendor": "Irtimaled",
73                 "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
74         ])
75     }
76 }
77
78 afterEvaluate {
79     remapJar.classifier = 'fabric'
80 }