-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
92 lines (79 loc) · 2.44 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
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
}
}
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'com.google.protobuf' version '0.8.17'
}
group = 'com.plusls'
version = project.plugin_version
sourceCompatibility = '16'
targetCompatibility = '16'
repositories {
mavenCentral()
maven {
name = 'velocitypowered-repo'
url = 'https://repo.velocitypowered.com/releases/'
}
maven {
name = 'minecraft-libraries'
url = 'https://libraries.minecraft.net/'
}
maven {
name = 'spongepowered-repo'
url = 'https://repo.spongepowered.org/maven'
}
maven {
name = 'opencollab-snapshot'
url = 'https://repo.opencollab.dev/maven-snapshots/'
}
}
dependencies {
compileOnly "com.velocitypowered:velocity-api:${project.velocity_version}"
annotationProcessor "com.velocitypowered:velocity-api:${project.velocity_version}"
compileOnly "org.geysermc.floodgate:api:${project.floodgate_version}"
compileOnly "io.netty:netty-all:${project.netty_version}"
compileOnly fileTree(dir: 'lib', include: ['*.jar'])
// bcrypt
implementation "org.mindrot:jbcrypt:${project.jbcrypt_version}"
// grpc
implementation "io.grpc:grpc-protobuf:${project.grpc_version}"
implementation "io.grpc:grpc-stub:${project.grpc_version}"
// implementation "io.grpc:grpc-netty-shaded:${project.grpc_version}"
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${project.protobuf_version}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${project.grpc_version}" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
// import org.apache.tools.ant.filters.ReplaceTokens
//task processSources(type: Sync) {
// from sourceSets.main.java.srcDirs
// inputs.property 'version', version
// filter ReplaceTokens, tokens: [version: version]
// into "$buildDir/src"
//}
//compileJava.source = processSources.outputs
build.dependsOn(shadowJar)