-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
121 lines (97 loc) · 3.07 KB
/
Copy pathbuild.gradle
File metadata and controls
121 lines (97 loc) · 3.07 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
plugins {
id 'fml-loom' version '0.1'
id 'maven-publish'
id 'com.gradleup.shadow' version '8.3.6'
}
version = project.mod_version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
maven {
name = "ModdedMITE"
url = uri("https://maven.limingzxc.top/repository/maven-public/")
}
}
configurations {
fml
shade
implementation.extendsFrom(shade)
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
fml "com.github.MinecraftIsTooEasy:FishModLoader:3.4.2"
implementation "com.github.MinecraftIsTooEasy:FishModLoader:3.4.2"
implementation "com.github.MinecraftIsTooEasy:RustedIronCore:1.5.5"
implementation "com.github.MinecraftIsTooEasy:FastUtil:8.5.12"
shade "com.fasterxml.jackson.core:jackson-databind:2.9.10.8"
shade "org.joml:joml:1.10.8"
shade "javax.vecmath:vecmath:1.5.2"
localRuntime "com.github.MinecraftIsTooEasy:Gson:2.10.1"
}
def fmlResolvedFile = configurations.fml.files.iterator().next()
loom {
accessWidenerPath = file("src/main/resources/geckolib_mite.accesswidener")
mergedMinecraftJar()
mods {
"GeckoLib MITE" {
sourceSet sourceSets.main
}
}
}
loom.setFML(fmlResolvedFile)
dependencies.add("mappings", loom.fmlMCPMappings())
processResources {
inputs.property "version", project.version
filesMatching("fml.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
archiveClassifier.set("dev")
}
shadowJar {
archiveClassifier.set("")
configurations = [project.configurations.shade]
mergeServiceFiles()
exclude "META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA"
}
assemble.dependsOn tasks.shadowJar
tasks.named('runClient', JavaExec).configure { exec ->
def user = project.hasProperty('username') ? project.username : 'Dev'
exec.setArgs(['--username', user, '--session', '0', '--width', '854', '--height', '480'])
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
groupId = project.maven_group
artifactId = project.archives_base_name
version = project.mod_version
from components.shadow
artifact tasks.sourcesJar
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
maven {
name = "ModdedMITE"
url = uri("https://maven.limingzxc.top/repository/maven-releases/")
credentials {
// Read only from gradle.properties (user level, your gradle_home)
username = project.findProperty("nexusUsername")
password = project.findProperty("nexusPassword")
}
}
}
}