-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
91 lines (76 loc) · 2.81 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
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'java'
id 'idea'
id 'maven-publish'
}
group = 'cn.apisium'
version = System.getenv('RELEASE_VERSION') ?: "0.0.0-DEV"
def pluginVersion = version
description = "A netty wrapper for Minecraft, which allows running multiple protocols in same port."
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/groups/public/" }
maven { url "https://repo.maven.apache.org/maven2" }
}
dependencies {
implementation 'org.shredzone.acme4j:acme4j:2.12'
implementation 'org.shredzone.acme4j:acme4j-utils:2.12'
implementation 'org.slf4j:slf4j-api:1.7.31'
implementation 'io.netty:netty-codec-http:4.1.78.Final'
implementation 'io.netty:netty-codec-http2:4.1.78.Final'
// implementation 'org.shredzone.acme4j:acme4j-client:2.12'
// implementation 'org.bouncycastle:bcpkix-jdk15on:1.69'
compileOnly 'io.netty:netty-all:4.1.65.Final'
compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT'
compileOnly('org.spigotmc:plugin-annotations:1.2.3-SNAPSHOT') {
exclude group: 'org.bukkit'
}
annotationProcessor 'org.spigotmc:plugin-annotations:1.2.3-SNAPSHOT'
}
shadowJar {
dependencies {
include(dependency('org.shredzone.acme4j:acme4j:2.12'))
include(dependency('org.shredzone.acme4j:acme4j-utils:2.12'))
include(dependency('org.shredzone.acme4j:acme4j-client:2.12'))
include(dependency('org.bouncycastle:bcpkix-jdk15on:1.69'))
include(dependency('org.bouncycastle:bcprov-jdk15on:1.69'))
include(dependency('org.bouncycastle:bcutil-jdk15on:1.69'))
include(dependency('org.bitbucket.b_c:jose4j:0.7.8'))
include(dependency('org.slf4j:slf4j-api:1.7.31'))
include(dependency('io.netty:netty-codec-http:4.1.78.Final'))
include(dependency('io.netty:netty-codec-http2:4.1.78.Final'))
relocate('org.slf4j', 'cn.apisium.uniporter.libs.org.slf4j')
relocate('org.shredzone', 'cn.apisium.uniporter.libs.org.shredzone')
relocate('org.jose4j', 'cn.apisium.uniporter.libs.org.jose4j')
relocate('org.bouncycastle', 'cn.apisium.uniporter.libs.org.bouncycastle')
}
exclude('META-INF/versions/**')
archiveClassifier.set('')
minimize()
filesMatching('plugin.yml') {
filter {
it.replaceAll('@@RELEASE_VERSION@@', pluginVersion)
}
}
}
jar {
enabled = false
dependsOn(shadowJar)
}
artifacts {
shadowJar
}
build.dependsOn(shadowJar)
publishing {
publications {
shadow(MavenPublication) {
publication -> project.shadow.component(publication)
}
}
}