forked from SlimeVR/SlimeVR-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (92 loc) · 2.94 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.3/userguide/java_library_plugin.html
*/
plugins {
id 'application'
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.diffplug.spotless" version "6.5.1"
}
sourceCompatibility = 1.11
targetCompatibility = 1.11
// Set compiler to use UTF-8
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
javadoc.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
// if (JavaVersion.current().isJava9Compatible()) {
// options.release = 8
// }
}
tasks.withType(Test) {
systemProperty('file.encoding', 'UTF-8')
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}
allprojects {
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
}
}
dependencies {
implementation project(':slime-java-commons')
implementation project(":solarxr-protocol")
implementation group: 'com.google.flatbuffers', name: 'flatbuffers-java', version: '2.0.3'
implementation group: 'commons-cli', name: 'commons-cli', version: '1.3.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.yaml:snakeyaml:1.30'
implementation 'net.java.dev.jna:jna:5.10.0'
implementation 'net.java.dev.jna:jna-platform:5.10.0'
implementation 'com.illposed.osc:javaosc-core:0.8'
implementation 'com.fazecast:jSerialComm:2.9.0'
implementation 'com.google.protobuf:protobuf-java:3.19.4'
implementation "org.java-websocket:Java-WebSocket:1.5.2"
implementation 'com.melloware:jintellitype:1.4.0'
// Use JUnit test framework
testImplementation platform('org.junit:junit-bom:5.8.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
}
shadowJar {
archiveBaseName.set('slimevr')
archiveClassifier.set('')
archiveVersion.set('')
}
application {
getMainClass().set('dev.slimevr.Main')
}
spotless {
// optional: limit format enforcement to just the files changed by this feature branch
// ratchetFrom 'origin/main'
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'
// define the steps to apply to those files
trimTrailingWhitespace()
endWithNewline()
indentWithTabs()
}
// format 'yaml', {
// target '*.yml', '*.yaml',
// trimTrailingWhitespace()
// endWithNewline()
// indentWithSpaces(2) // YAML cannot contain tabs: https://yaml.org/faq.html
// }
java {
removeUnusedImports()
// Use eclipse JDT formatter
eclipse().configFile("spotless.xml")
}
}