traccar/build.gradle

113 lines
4.4 KiB
Groovy
Raw Normal View History

2019-04-01 13:35:39 +08:00
plugins {
id "java"
id "checkstyle"
2022-10-03 01:31:57 +08:00
id "com.google.protobuf" version "0.8.19"
2022-10-03 01:34:31 +08:00
id "org.kordamp.gradle.project-enforcer" version "0.10.0"
2019-04-01 13:35:39 +08:00
}
repositories {
mavenCentral()
}
2021-04-05 06:14:45 +08:00
sourceCompatibility = "11"
2019-04-01 13:35:39 +08:00
compileJava.options.encoding = "UTF-8"
2021-04-05 02:07:43 +08:00
jar.destinationDirectory = file("$projectDir/target")
2020-06-08 07:21:46 +08:00
2019-04-01 13:35:39 +08:00
checkstyle {
2022-10-03 01:34:31 +08:00
toolVersion = "10.3.4"
2019-04-01 13:35:39 +08:00
configFile = "gradle/checkstyle.xml" as File
checkstyleTest.enabled = false
}
2021-04-05 01:41:52 +08:00
enforce {
rule(enforcer.rules.EnforceBytecodeVersion) { r ->
2021-04-05 06:14:45 +08:00
r.maxJdkVersion = "11"
2021-04-05 01:41:52 +08:00
}
}
2023-02-05 06:13:37 +08:00
ext {
guiceVersion = "5.1.0"
jettyVersion = "10.0.13" // jetty 11 javax to jakarta
jerseyVersion = "2.38" // jersey 3 javax to jakarta
jacksonVersion = "2.13.3" // same version as jersey-media-json-jackson dependency
protobufVersion = "3.21.12"
jxlsVersion = "2.12.0"
2023-03-07 03:07:28 +08:00
junitVersion = "5.9.2"
2023-02-05 06:13:37 +08:00
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protobufVersion"
}
}
2019-04-01 13:35:39 +08:00
dependencies {
2020-11-04 07:47:59 +08:00
implementation "commons-codec:commons-codec:1.15"
2022-10-03 02:15:46 +08:00
implementation "com.h2database:h2:2.1.214"
2023-02-05 06:13:37 +08:00
implementation "com.mysql:mysql-connector-j:8.0.32"
implementation "org.postgresql:postgresql:42.5.3"
implementation "com.microsoft.sqlserver:mssql-jdbc:12.2.0.jre11"
2022-01-18 10:59:55 +08:00
implementation "com.zaxxer:HikariCP:5.0.1"
2023-02-05 06:13:37 +08:00
implementation "io.netty:netty-all:4.1.87.Final"
implementation "org.slf4j:slf4j-jdk14:2.0.6"
2019-04-29 09:59:11 +08:00
implementation "com.google.inject:guice:$guiceVersion"
2022-06-08 09:04:24 +08:00
implementation "com.google.inject.extensions:guice-servlet:$guiceVersion"
2021-02-01 15:25:14 +08:00
implementation "org.owasp.encoder:encoder:1.2.3"
2022-11-28 07:32:12 +08:00
implementation "org.glassfish:jakarta.json:1.1.6"
2019-04-01 13:35:39 +08:00
implementation "org.eclipse.jetty:jetty-server:$jettyVersion"
implementation "org.eclipse.jetty:jetty-servlet:$jettyVersion"
2022-06-25 22:54:39 +08:00
implementation "org.eclipse.jetty:jetty-servlets:$jettyVersion"
2019-04-01 13:35:39 +08:00
implementation "org.eclipse.jetty:jetty-webapp:$jettyVersion"
implementation "org.eclipse.jetty:jetty-jndi:$jettyVersion"
implementation "org.eclipse.jetty:jetty-proxy:$jettyVersion"
2021-04-05 06:38:42 +08:00
implementation "org.eclipse.jetty.websocket:websocket-jetty-server:$jettyVersion"
2019-04-01 13:35:39 +08:00
implementation "org.glassfish.jersey.containers:jersey-container-servlet:$jerseyVersion"
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jerseyVersion"
implementation "org.glassfish.jersey.inject:jersey-hk2:$jerseyVersion"
2022-02-18 16:00:12 +08:00
implementation "org.glassfish.hk2:guice-bridge:2.6.1" // same version as jersey-hk2
2019-04-01 13:35:39 +08:00
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jacksonVersion"
2022-06-13 01:40:53 +08:00
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr353:$jacksonVersion"
2023-02-05 06:13:37 +08:00
implementation "org.liquibase:liquibase-core:4.19.0"
2022-11-28 07:32:12 +08:00
implementation "com.sun.mail:jakarta.mail:1.6.7"
2023-01-30 01:33:16 +08:00
implementation "org.jxls:jxls:$jxlsVersion"
implementation "org.jxls:jxls-poi:$jxlsVersion"
2023-02-05 06:13:37 +08:00
implementation "org.apache.velocity:velocity-engine-core:2.3"
implementation "org.apache.velocity.tools:velocity-tools-generic:3.1"
2019-08-25 05:17:44 +08:00
implementation "org.apache.commons:commons-collections4:4.4"
2023-02-05 06:13:37 +08:00
implementation "org.mnode.ical4j:ical4j:3.2.8"
2021-02-01 15:25:14 +08:00
implementation "org.locationtech.spatial4j:spatial4j:0.8"
2022-10-03 02:15:46 +08:00
implementation "org.locationtech.jts:jts-core:1.19.0"
2023-02-05 06:13:37 +08:00
implementation "net.java.dev.jna:jna-platform:5.13.0"
2022-11-28 07:32:12 +08:00
implementation "com.github.jnr:jnr-posix:3.1.16"
2019-11-30 09:22:36 +08:00
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
2019-04-01 13:35:39 +08:00
implementation "javax.activation:activation:1.1.1"
2023-02-05 06:13:37 +08:00
implementation "com.amazonaws:aws-java-sdk-sns:1.12.399"
implementation "org.apache.kafka:kafka-clients:3.3.2"
implementation "com.hivemq:hivemq-mqtt-client:1.3.0"
2023-03-07 02:56:23 +08:00
implementation "redis.clients:jedis:4.3.1"
2023-02-07 03:32:04 +08:00
implementation "com.google.firebase:firebase-admin:9.1.1"
2023-04-02 05:06:56 +08:00
implementation "com.nimbusds:oauth2-oidc-sdk:10.7.1"
2023-03-07 03:07:28 +08:00
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
2023-03-07 03:32:57 +08:00
testImplementation "org.mockito:mockito-core:5.1.1"
2019-04-01 13:35:39 +08:00
}
2023-03-07 03:07:28 +08:00
test {
useJUnitPlatform()
}
2019-04-01 13:35:39 +08:00
task copyDependencies(type: Copy) {
into "$projectDir/target/lib"
from configurations.runtimeClasspath
}
2021-04-05 02:07:43 +08:00
assemble.dependsOn(copyDependencies)
2019-04-01 13:35:39 +08:00
jar {
manifest {
attributes(
"Main-Class": "org.traccar.Main",
2023-02-05 07:18:21 +08:00
"Implementation-Version": "5.6",
2019-04-01 13:35:39 +08:00
"Class-Path": configurations.runtimeClasspath.files.collect { "lib/$it.name" }.join(" "))
}
}