generated from LCLPYT/kibu-plugin-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
154 lines (123 loc) · 4.62 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
plugins {
id 'java'
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
id 'gradle-build-utils' version '1.7.0'
}
Properties props = buildUtils.loadProperties('publish.properties')
group = project.maven_group
version = buildUtils.gitVersion()
base {
archivesName = project.archives_base_name
}
repositories {
mavenCentral()
maven {
url "https://repo.lclpnet.work/repository/internal"
}
maven {
url "https://repo.lclpnet.work/repository/snapshots"
}
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
maven {
url = 'https://maven.nucleoid.xyz/'
}
maven {
url "https://maven.terraformersmc.com/releases/"
}
maven {
url "https://maven.shedaniel.me/"
}
}
loom {
// if you want to develop a plugin for dedicated servers, uncomment the following block
serverOnlyMinecraftJar()
runs {
remove client
server {
vmArgs "-Dfabric-tag-conventions-v2.missingTagTranslationWarning=SILENCED"
}
}
accessWidenerPath = file("src/main/resources/ap2.accesswidener")
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// extra dependencies required for compilation
implementation 'org.json:json:20231013'
include(implementation('work.lclpnet:json-config4j:1.0.0'))
include(implementation('org.apache.commons:commons-compress:1.26.2'))
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "work.lclpnet.mods.kibu:kibu:${project.kibu_version}"
modImplementation "work.lclpnet.mods.kibu:kibu-world-api:${project.kibu_world_api_version}"
modImplementation "xyz.nucleoid:fantasy:${project.fantasy_version}"
modImplementation "maven.modrinth:sqlite-jdbc:3.41.2.1+20230506"
modImplementation "work.lclpnet.mods:combat-control:${project.combat_control_version}"
modImplementation "work.lclpnet.mods:notica:${project.notica_version}"
modImplementation "work.lclpnet.mods:mg-lobby:${project.lobby_version}"
// optional runtime dependencies (not explicitly required for compilation, but needed to play the game)
modLocalRuntime "work.lclpnet.mods:pal:${project.pal_version}"
modLocalRuntime "work.lclpnet.mods:ruler:${project.ruler_version}"
modLocalRuntime "work.lclpnet.mcserver-api:mcserver-api-fabric:${project.mcserver_api_version}"
implementation "work.lclpnet:translations4j:${project.translations4j_version}"
implementation "work.lclpnet:translations4j:${project.translations4j_version}:network"
// optional runtime dependencies (not required to play)
modLocalRuntime "work.lclpnet.mods:mc-debug-sender-impl:${project.mc_debug_sender_impl_version}"
modLocalRuntime "maven.modrinth:anti-xray:${project.anti_xray_version}"
localRuntime "com.moandjiezana.toml:toml4j:${project.toml_version}"
// test dependencies
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation 'org.mockito:mockito-core:5.6.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.1'
testImplementation "net.fabricmc:fabric-loader-junit:${project.loader_version}"
testImplementation 'org.xerial:sqlite-jdbc:3.41.2.2'
}
test {
useJUnitPlatform()
systemProperty('fabric.side', 'server')
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release.set(21)
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
[jar, sourcesJar].each {
it.from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = project.base.archivesName.get()
from components.java
pom {
name = 'Arcade Party 2'
description = 'Reworked ArcadeParty as Fabric mini-game.'
}
}
}
buildUtils.setupPublishRepository(repositories, props)
}