-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
105 lines (85 loc) · 2.37 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
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
}
}
plugins {
id 'application'
id 'java'
id 'idea'
id 'com.google.protobuf' version "0.8.18"
}
group 'cn.fkj233'
version '1.0-SNAPSHOT'
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = 17
targetCompatibility = 17
repositories {
mavenCentral()
}
dependencies {
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.18.2'
implementation group: 'io.javalin', name: 'javalin', version: '4.6.4'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.36'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.3'
implementation group: 'org.jline', name: 'jline', version: '3.21.0'
implementation group: 'org.jline', name: 'jline-terminal-jna', version: '3.21.0'
protobuf files('proto/')
}
application {
// Define the main class for the application
getMainClass().set('cn.fkj233.GenshinDispatch')
}
configurations.all {
exclude group: 'org.slf4j', module: 'slf4j'
}
jar {
exclude '*.proto'
manifest {
attributes 'Main-Class': 'cn.fkj233.GenshinDispatch'
}
archiveBaseName = 'genshindispatch'
if (project.hasProperty('jarFilename')) {
archiveFileName = "${jarFilename}.${extension}"
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
destinationDirectory = file(".")
}
clean {
delete protobuf.generatedFilesBaseDir
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.18.1'
}
generatedFilesBaseDir = "$projectDir/src/generated/"
}
sourceSets {
main {
proto {
srcDir 'src/generated'
}
java {
srcDir 'src/java'
}
}
}
idea {
module {
sourceDirs += file("/proto/");
}
}
processResources {
dependsOn "generateProto"
}