forked from Fuzss/forgeconfigapiport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (85 loc) · 2.69 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'io.github.juuxel.loom-quiltflower' version '1.8.0'
id 'maven-publish'
id 'java-library'
id 'java'
}
group = "com.halotroop"
repositories {
mavenCentral()
maven { url = "https://maven.terraformersmc.com/releases/" }
maven {
name 'ParchmentMC'
url 'https://maven.parchmentmc.org'
description 'Minecraft JavaDocs'
content {
includeGroup 'org.parchmentmc.data'
}
}
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraftVersion}"
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.18.2:2022.11.06@zip")
}
// Fabric
modImplementation "net.fabricmc:fabric-loader:${fabricVersion}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}"
// Mod Menu
modImplementation "com.terraformersmc:modmenu:3.1.0"
// Config Dependencies
include(implementation('com.electronwill.night-config:core:3.6.5'))
include(implementation('com.electronwill.night-config:toml:3.6.5'))
}
loom {
accessWidenerPath = file("src/main/resources/forge-apis-fabric.accesswidener")
mixin {
defaultRefmapName = "forgeapis-fabric.refmap.json"
}
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
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.set 17
}
javadoc.options {
encoding = "UTF-8"
addStringOption('Xdoclint:none', '-quiet')
}
java {
withSourcesJar()
withJavadocJar()
}
tasks.withType(Jar).configureEach {
from("LICENSE.md") {
rename { "${it}_${project.archivesBaseName}" }
}
from rootProject.file("LICENSE-NIGHT-CONFIG")
from rootProject.file("LICENSING.md")
}
tasks.withType(GenerateModuleMetadata) {
// Disables Gradle's custom module metadata from being published to maven. The
// metadata includes mapped dependencies which are not reasonably consumable by
// other mod developers.
enabled = false
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}