-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
80 lines (66 loc) · 2.03 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
plugins {
id 'java'
id 'maven-publish'
id 'io.freefair.lombok' version '6.0.0-m2'
id 'com.github.johnrengelman.shadow' version '7.1.0'
}
group 'io.apjifengc.bingo'
version '2.0.5'
repositories {
mavenCentral()
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://repo.onarandombox.com/content/groups/public/' }
maven { url 'https://libraries.minecraft.net/' }
maven { url 'https://repo.codemc.org/repository/maven-public/' }
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT'
compileOnly 'com.mojang:authlib:2.3.31'
compileOnly project(":spigot_shadow") // module for some classes that aren't in the bukkit API.
shadow 'de.tr7zw:item-nbt-api:2.11.1'
implementation 'org.jetbrains:annotations:23.0.0'
}
shadowJar {
configurations = [project.configurations.shadow]
archiveClassifier = ''
relocate 'de.tr7zw.changeme.nbtapi','io.apjifengc.bingo.internal.nbtapi'
}
build {
dependsOn(shadowJar)
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Jar) {
destinationDirectory = file("$rootDir/run/plugins/")
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(sourceSets.main.resources.srcDirs) {
include 'plugin.yml' expand 'version': project.version
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourceJar {
classifier 'sources'
}
}
}
repositories {
maven {
url = project.properties.repo_address
credentials {
username project.properties.repo_username as String
password project.properties.repo_password as String
}
}
}
}