forked from henkelmax/simple-voice-chat
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
104 lines (88 loc) · 2.88 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
103
104
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
id "com.matthewprenger.cursegradle" version "1.4.0"
id "com.github.johnrengelman.shadow" version "7.0.0"
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
repositories {
mavenLocal()
mavenCentral()
maven { url = "https://maven.fabricmc.net/" }
maven {
name = "henkelmax.public"
url = 'https://maven.maxhenkel.de/repository/public'
}
}
minecraft {
accessWidener = file("src/main/resources/voicechat.accesswidener")
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings minecraft.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'de.maxhenkel.opus4j:opus4j:1.0.0'
shadow 'de.maxhenkel.opus4j:opus4j:1.0.0'
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
}
processResources {
filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft_dependency": project.minecraft_dependency,
"loader_version": project.loader_version,
"fabric_version": project.fabric_version
}
filesMatching("compatibility.properties") {
expand "mod_compatibility_version": project.mod_compatibility_version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
java {
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}
curseforge {
apiKey = System.env.CURSEFORGE_API_KEY != null ? System.env.CURSEFORGE_API_KEY : (file('curseforge_api_key.txt').exists() ? file('curseforge_api_key.txt').text : '')
project {
id = curse_id
changelogType = 'markdown'
changelog = file('changelog.md')
releaseType = curse_release_type
addGameVersion curseforge_minecraft_version
addGameVersion "Fabric"
mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) {
displayName = "[FABRIC][${minecraft_version}] ${mod_name} ${mod_version}"
relations {
requiredDependency 'fabric-api'
}
}
afterEvaluate {
uploadTask.dependsOn(remapJar)
}
}
options {
forgeGradleIntegration = false
}
}
shadowJar {
configurations = [project.configurations.shadow]
classifier 'shadow-dev'
relocate 'com.sun.jna', "com.sun.jna"
}
remapJar {
dependsOn shadowJar
input.set shadowJar.archiveFile.get()
}