forked from meshtastic/meshtastic-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
112 lines (88 loc) · 3.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
108
109
110
111
112
plugins {
id 'java'
id 'application'
id 'idea'
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion"
id 'org.jetbrains.intellij' version '0.7.2'
id 'com.google.protobuf' version '0.8.18'
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlinVersion"
// Stuff for Spring
id "org.jetbrains.kotlin.kapt" version "$kotlinVersion"
id "org.springframework.boot" version "2.5.7" // 2.4.13 ok but 2.6.1 is not
id "io.spring.dependency-management" version "1.0.11.RELEASE"
id 'org.jetbrains.kotlin.plugin.spring' version "$kotlinVersion"
}
group 'org.meshtastic'
version '1.0-SNAPSHOT'
application {
// No longer used, instead we use @SpringBootApplication
// mainClassName = "org.meshtastic.backend.MainKt"
}
java {
// We are staying with jdk 8 for now because newer ones generate warnings about reflection. Also the docker images are much smaller.
sourceCompatibility = JavaVersion.VERSION_1_8
}
compileKotlin {
kotlinOptions {
useIR = true
// Try using the new compiler https://blog.jetbrains.com/kotlin/2021/02/the-jvm-backend-is-in-beta-let-s-make-it-stable-together/
jvmTarget = "1.8"
}
}
kotlin {
}
protobuf {
// Configure the protoc executable
protoc {
// Download from repositories (newer versions generate a build error about missing isStringEqual method)
artifact = 'com.google.protobuf:protoc:3.17.3'
}
generatedFilesBaseDir = "$buildDir/generated/sources/proto"
}
idea {
module {
// So intellij can do code completion on the generated protobuf files
generatedSourceDirs += file('build/generated/sources')
}
}
repositories {
mavenCentral()
// jcenter()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
// Pull in the Spring REST controller
implementation "org.springframework.boot:spring-boot-starter-mustache"
implementation "org.springframework.boot:spring-boot-starter-web"
developmentOnly "org.springframework.boot:spring-boot-devtools"
// For GeoJSONController
// https://mvnrepository.com/artifact/de.grundid.opendatalab/geojson-jackson
implementation group: 'de.grundid.opendatalab', name: 'geojson-jackson', version: '1.14'
// To auto serialize protobufs as json
// https://mvnrepository.com/artifact/com.hubspot.jackson/jackson-datatype-protobuf
implementation group: 'com.hubspot.jackson', name: 'jackson-datatype-protobuf', version: '0.9.12'
kapt "org.springframework.boot:spring-boot-configuration-processor"
// MQTT client lib
// https://mvnrepository.com/artifact/org.eclipse.paho/org.eclipse.paho.client.mqttv3
implementation group: 'org.eclipse.paho', name: 'org.eclipse.paho.client.mqttv3', version: '1.2.5'
implementation 'com.google.protobuf:protobuf-java:3.19.1'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1'
// for logging see https://github.com/MicroUtils/kotlin-logging/wiki
implementation 'io.github.microutils:kotlin-logging-jvm:2.1.16'
// conflicts with Spring logging implementation 'org.slf4j:slf4j-simple:1.7.29'
// Manually specify the newer version of jetbrains annotations?
// implementation 'org.jetbrains:annotations:23.0.0'
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2020.3.3'
}
patchPluginXml {
changeNotes """
Add change notes here.<br>
<em>most HTML tags may be used</em>"""
}
test {
useJUnitPlatform()
}