forked from NyaaCat/Yasui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (72 loc) · 2.68 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
apply plugin: "java-library"
apply plugin: "maven-publish"
ext.majorVersion = 7
ext.minorVersion = 0
ext.minecraftVersion = "1.15.2"
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Suppiled by Jenkins
ext.buildNumber = System.env.BUILD_NUMBER == null ? "x" : "$System.env.BUILD_NUMBER"
ext.mavenDirectory = System.env.MAVEN_DIR == null ? "$projectDir/repo" : "$System.env.MAVEN_DIR"
// Version used for distribution. Different from maven repo
group = "cat.nyaa"
archivesBaseName = "Yasui-mc$minecraftVersion"
version = "$majorVersion.$minorVersion.$buildNumber"
repositories {
jcenter()
maven { name 'Spigot'; url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { name 'Sonatype'; url 'https://oss.sonatype.org/content/groups/public' }
maven { name 'NyaaCat'; url 'https://ci.nyaacat.com/maven/' }
maven { name 'sk89q'; url 'https://maven.sk89q.com/repo/' }
maven { name 'papermc'; url 'https://papermc.io/repo/repository/maven-public/' }
maven { name 'aikar'; url 'https://repo.aikar.co/content/groups/aikar/' }
}
dependencies {
// spigot
compileOnly "com.destroystokyo.paper:paper-api:$minecraftVersion-R0.1-SNAPSHOT"
compileOnly ('com.sk89q.worldedit:worldedit-bukkit:7.0.1-SNAPSHOT') {
exclude group: 'io.papermc', module: 'paperlib'
exclude group: 'org.bstats.bStats-Metrics', module: 'bstats-bukkit'
exclude group: 'org.bukkit', module: 'bukkit'
exclude group: 'com.destroystokyo.paper', module: 'paper-api'
exclude group: 'org.mozilla', module: 'rhino'
exclude group: 'de.schlichtherle', module: 'truezip'
}
// other nyaa plugins
if (gradle.hasProperty("useLocalDependencies") && gradle.useLocalDependencies) {
compileOnly project(":NyaaCore")
compileOnly project(":NyaaUtils")
} else {
compileOnly('cat.nyaa:nyaacore:7.0-SNAPSHOT')
compileOnly('cat.nyaa:nyaautils:7.0-SNAPSHOT')
}
// 3rd party plugins
//compileOnly 'com.udojava:EvalEx:2.1' // NyaaCore shadows this
// annotation processor
}
// publications
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
processResources { // modify version string
filesMatching("**/plugin.yml") {
expand 'version': project.version
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact sourcesJar
groupId "cat.nyaa"
artifactId "yasui"
version "$majorVersion.$minorVersion-SNAPSHOT"
from components.java
}
}
repositories {
maven {
url "${mavenDirectory}"
}
}
}