This repository has been archived by the owner on Mar 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
98 lines (78 loc) · 2.57 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
import org.gradle.api.publish.maven.MavenPublication
plugins {
id 'java'
id 'maven-publish'
}
group 'NyaaCat'
String majorVersion = 1
String minorVersion = 2
String minecraftVersion = "1.16.1"
String buildNumber = System.getenv("BUILD_NUMBER") == null ? "SNAPSHOT" : System.getenv("BUILD_NUMBER")
version = "$majorVersion.$minorVersion-$buildNumber"
boolean releasing = false
String mavenDirectory = System.getenv("MAVEN_DIR") == null ? "$projectDir/repo" : System.getenv("MAVEN_DIR")
String mavenVersion = releasing ? version : "$majorVersion.$minorVersion-SNAPSHOT"
repositories {
mavenCentral()
maven {
name 'Spigot'
url 'https://hub.spigotmc.org/nexus/content/groups/public/'
}
maven {
name 'NyaaCat'
url 'https://ci.nyaacat.com/maven/'
}
maven {
name 'sk89q'
url "http://maven.sk89q.com/repo/"
}
maven {
name 'ProtocolLib'
url "http://repo.dmulloy2.net/nexus/repository/public/"
}
maven { name 'aikar'; url 'https://repo.aikar.co/content/groups/aikar/' }
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile('cat.nyaa:nyaacore:8.0-SNAPSHOT')
compileOnly "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT"
compileOnly "com.udojava:EvalEx:2.1"
implementation 'com.meowj:LangUtils:2.3-SNAPSHOT'
implementation('com.sk89q.worldguard:worldguard-core:7.0.0-SNAPSHOT')
implementation('com.sk89q.worldguard:worldguard-legacy:7.0.0-SNAPSHOT') {
exclude group: 'io.papermc', module: 'paperlib'
exclude group: 'org.bstats', module: 'bstats-bukkit'
exclude group: 'org.bukkit', module: 'bukkit'
}
// compileOnly group: "com.comphenix.protocol", name: "ProtocolLib", version: "4.4.0"
}
task apiJar(type: Jar) {
includeEmptyDirs = false
from sourceSets.main.output.classesDirs
include('**/cat/nyaa/infiniteinfernal/')
}
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.java.srcDirs
}
publishing {
publications {
mavenRelease(MavenPublication) {
from components.java
afterEvaluate {
artifacts = [jar, sourcesJar]
}
groupId "cat.nyaa"
artifactId "infiniteinfernal"
version "$mavenVersion"
}
}
repositories {
maven {
url "$mavenDirectory"
}
}
}