-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
executable file
·124 lines (111 loc) · 2.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
plugins {
id("java")
id("java-library")
id("maven-publish")
id("eclipse")
id("org.spongepowered.gradle.plugin") version "2.0.2"
id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT"
}
minecraft {
version("${minecraft}")
}
group = "sawfowl.regionguard"
version = "${major}.${minor}.${patch}-${suffix}-S${api}"
java {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
}
compileJava.options.compilerArgs << "-Xmaxerrs" << "9999"
repositories {
mavenCentral()
maven {
name = "Forge"
url = 'https://maven.minecraftforge.net'
}
maven {
name = "Sponge"
url = "https://repo.spongepowered.org/repository/maven-public"
}
//maven {
// name = "AspectRepo"
// url 'https://maven.aspect-realms.ru/repository/maven-public/'
//}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
implementation "org.spongepowered:spongeapi:${api}"
implementation "org.spongepowered:spongevanilla:1.21-12.0.0-RC1779:universal"
//implementation "com.github.SawFowl:LocaleAPI:${localeapi}"
//implementation "com.github.SawFowl:CommandPack:${commandpack}"
implementation fileTree(dir: 'libs', include: '*.jar')
}
sponge {
apiVersion("${api}")
loader {
name("java_plain")
version("1.0")
}
license("GPL-3.0")
plugin("regionguard") {
displayName(project.name.capitalize())
version("${project.version}")
entrypoint("${project.group}.RegionGuard")
description("Create regions and protect them from various actions of other players.")
links {
homepage("https://discord.gg/7xnZGSYJH9")
source("https://github.com/SawFowl/RegionGuard")
issues("https://discord.gg/7xnZGSYJH9")
}
contributor("SawFowl") {
description("Lead Developer")
}
dependency("spongeapi") {
optional(false)
loadOrder("after")
version("${api}")
}
dependency("localeapi") {
optional(false)
loadOrder("after")
version("${localeapi}")
}
dependency("commandpack") {
optional(false)
loadOrder("after")
version("${commandpack}")
}
dependency("mysqldriver") {
optional(true)
loadOrder("after")
version("1.0.0")
}
dependency("h2driver") {
optional(true)
loadOrder("after")
version("1.0.0")
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
configurations {
doc {
transitive false
}
}
javadoc {
options.encoding = 'UTF-8'
source configurations.doc.collect { zipTree(it) }
options.addStringOption('Xdoclint:none', '-quiet')
}