-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
118 lines (94 loc) · 2.86 KB
/
build.gradle
File metadata and controls
118 lines (94 loc) · 2.86 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
plugins {
id 'fml-loom' version '0.1'
id 'maven-publish'
}
version = project.mod_version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
mavenLocal()
maven {
name = "Spongepowered"
url = "https://repo.spongepowered.org/repository/maven-public/"
}
maven {
name = "ModdedMITE"
url = uri("https://maven.limingzxc.top/repository/maven-public/")
}
}
configurations {
fml
}
tasks.named('runClient', JavaExec).configure { exec ->
def user = project.hasProperty('username') ? project.username : 'Dev'
exec.setArgs(['--username', user, '--session', '0', '--width', '854', '--height', '480'])
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// implementation("org.spongepowered:mixin:0.8.5")
fml "com.github.MinecraftIsTooEasy:FishModLoader:3.4.2"
implementation "com.github.MinecraftIsTooEasy:FishModLoader:3.4.2"
implementation "com.github.MinecraftIsTooEasy:RustedIronCore:1.5.0"
implementation "com.github.MinecraftIsTooEasy:RustedIronCore:1.5.0:sources"
implementation "com.github.MinecraftIsTooEasy:ManyLib:2.3.0"
implementation "com.github.MinecraftIsTooEasy:Gson:2.10.1"
implementation "com.github.MinecraftIsTooEasy:ModMenu:10.1.1"
}
def fmlResolvedFile = configurations.fml.files.iterator().next()
loom {
accessWidenerPath = file("src/main/resources/extragui.accessWidener")
mergedMinecraftJar()
setFML(fmlResolvedFile)
mods {
"Hwite" {
sourceSet sourceSets.main
}
}
}
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 {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
groupId = project.maven_group
artifactId = project.archives_base_name
version = project.mod_version
from components.java
}
}
// 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")
}
}
}
}