-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
78 lines (66 loc) · 2.21 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
apply plugin: "java-library"
apply plugin: "maven-publish"
ext.majorVersion = 8
ext.minorVersion = 5
ext.minecraftVersion = "1.21.1"
sourceCompatibility = 21
targetCompatibility = 21
// 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 = "Ourtown"
version = "$majorVersion.$minorVersion"
repositories {
mavenCentral()
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 'enginehub'; url 'https://maven.enginehub.org/repo/' }
maven { name "essentialsx-releases"; url "https://repo.essentialsx.net/releases/" }
maven { name "papermc"; url "https://papermc.io/repo/repository/maven-public/" }
maven { name 'jitpack'; url 'https://jitpack.io' }
maven { name 'NyaaCat'; url 'https://ci.nyaacat.com/maven/' }
}
dependencies {
compileOnly 'org.jetbrains:annotations:22.0.0'
// spigot
compileOnly "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT"
// other nyaa plugins
compileOnly('cat.nyaa:nyaacore:9.4')
compileOnly('cat.nyaa:ecore:0.3.4')
// 3rd party plugins
compileOnly('net.essentialsx:EssentialsX:2.20.1')
// annotation processor
annotationProcessor "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT"
}
// publications
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
processResources { // modify version string
filesMatching("**/plugin.yml") {
expand 'version': project.version
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact sourcesJar
groupId "cat.nyaa"
artifactId "ourtown"
version "$majorVersion.$minorVersion"
from components.java
}
}
repositories {
maven {
url "${mavenDirectory}"
}
}
}