-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (95 loc) · 2.52 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
plugins {
id 'java'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id("co.uzzu.dotenv.gradle") version "1.2.0"
}
group = "com.mingcraft.minglib"
version = "1.0.30"
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
mavenLocal()
maven {
name = 'papermc-repo'
url = 'https://papermc.io/repo/repository/maven-public/'
}
repositories {
maven {
url = uri("https://maven.pkg.github.com/project-astea/asteaservermanagerconnector")
credentials {
username = env.GPR_USER.value
password = env.GPR_KEY.value
}
}
}
repositories {
maven {
url = uri("https://maven.pkg.github.com/project-astea/asteapacketmanager")
credentials {
username = env.GPR_USER.value
password = env.GPR_KEY.value
}
}
}
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT'
implementation 'org.mongodb:mongodb-driver-sync:4.3.4'
compileOnly 'com.mingcraft:asmc:1.0.4'
implementation 'com.mingcraft:asteapacketmanager:1.0.3'
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
task replaceVersionInREADME {
ant.replaceregexp(match:'com\\.mingcraft\\:minglib\\:([0-9\\.]+)', replace:"com.mingcraft:minglib:${version}", flags:'g', byline:true) {
fileset(dir: '.', includes: 'README.md')
}
}
test {
useJUnitPlatform()
}
jar {
destinationDirectory = file(env.JAR_DIR.value)
}
shadowJar {
manifest {
attributes 'Main-Class': 'com.mingcraft.minglib.MingLib'
}
destinationDirectory = file(env.JAR_DIR.value)
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/mingcraft/minglib")
credentials {
username = env.GPR_USER.value
password = env.GPR_KEY.value
}
}
}
publications {
gpr(MavenPublication) {
groupId = "com.mingcraft"
artifactId = "minglib"
version = this.version
from(components.java)
}
}
}