traccar/build.gradle

121 lines
4.7 KiB
Groovy
Raw Permalink Normal View History

2019-04-01 13:35:39 +08:00
plugins {
id "java"
id "checkstyle"
2023-11-20 07:01:42 +08:00
id "com.google.protobuf" version "0.9.4"
2024-09-16 09:46:08 +08:00
id "org.kordamp.gradle.project-enforcer" version "0.14.0"
2019-04-01 13:35:39 +08:00
}
repositories {
mavenCentral()
}
2024-06-02 05:22:43 +08:00
java {
2024-07-07 08:06:08 +08:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2024-06-02 05:22:43 +08:00
}
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 {
2024-09-16 09:46:08 +08:00
toolVersion = "10.18.1"
2024-06-02 05:22:43 +08:00
configFile = file("gradle/checkstyle.xml")
2019-04-01 13:35:39 +08:00
checkstyleTest.enabled = false
}
2021-04-05 01:41:52 +08:00
enforce {
2024-07-07 08:06:08 +08:00
// noinspection UnnecessaryQualifiedReference
2024-04-06 09:16:09 +08:00
rule(enforcer.rules.EnforceBytecodeVersion) { r ->
2024-07-07 08:06:08 +08:00
r.maxJdkVersion = "17"
2021-04-05 01:41:52 +08:00
}
}
2023-02-05 06:13:37 +08:00
ext {
2023-08-20 04:25:39 +08:00
guiceVersion = "7.0.0"
2024-09-16 09:46:08 +08:00
jettyVersion = "11.0.24"
jerseyVersion = "3.1.8"
2024-07-28 22:18:37 +08:00
jacksonVersion = "2.17.2" // same version as jersey-media-json-jackson dependency
2024-09-16 09:46:08 +08:00
protobufVersion = "4.28.1"
2024-07-29 00:06:02 +08:00
jxlsVersion = "2.14.0" // version 3 has breaking changes
2024-09-16 09:46:08 +08:00
junitVersion = "5.11.0"
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 {
2024-07-28 22:18:37 +08:00
implementation "commons-codec:commons-codec:1.17.1"
2024-09-16 09:46:08 +08:00
implementation "com.h2database:h2:2.3.232"
2024-07-28 22:18:37 +08:00
implementation "com.mysql:mysql-connector-j:9.0.0"
implementation "org.mariadb.jdbc:mariadb-java-client:3.4.1"
2024-09-16 09:46:08 +08:00
implementation "org.postgresql:postgresql:42.7.4"
implementation "com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11"
2023-11-20 07:01:42 +08:00
implementation "com.zaxxer:HikariCP:5.1.0"
2024-09-16 09:46:08 +08:00
implementation "io.netty:netty-all:4.1.113.Final"
implementation "org.slf4j:slf4j-jdk14:2.0.16"
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"
2023-08-20 04:25:39 +08:00
implementation "org.glassfish:jakarta.json:2.0.1"
implementation "com.sun.mail:jakarta.mail:2.0.1"
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"
2024-09-16 09:46:08 +08:00
implementation "org.glassfish.hk2:guice-bridge:3.1.1" // same version as jersey-hk2
2019-04-01 13:35:39 +08:00
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jacksonVersion"
2023-08-20 04:25:39 +08:00
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp:$jacksonVersion"
2023-11-21 06:59:33 +08:00
implementation "org.liquibase:liquibase-core:4.23.2" // upgrade has issues
2024-07-28 22:18:37 +08:00
implementation "org.apache.commons:commons-jexl3:3.4.0"
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"
2024-09-16 09:46:08 +08:00
implementation "org.mnode.ical4j:ical4j:4.0.4"
2021-02-01 15:25:14 +08:00
implementation "org.locationtech.spatial4j:spatial4j:0.8"
2024-09-16 09:46:08 +08:00
implementation "org.locationtech.jts:jts-core:1.20.0"
2024-01-15 00:20:49 +08:00
implementation "net.java.dev.jna:jna-platform:5.14.0"
2024-04-06 09:13:33 +08:00
implementation "com.github.jnr:jnr-posix:3.1.19"
2019-11-30 09:22:36 +08:00
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
2024-09-16 09:46:08 +08:00
implementation "com.amazonaws:aws-java-sdk-sns:1.12.772"
2024-07-28 22:18:37 +08:00
implementation "org.apache.kafka:kafka-clients:3.8.0"
2023-11-20 07:01:42 +08:00
implementation "com.hivemq:hivemq-mqtt-client:1.3.3"
2024-09-16 09:46:08 +08:00
implementation "redis.clients:jedis:5.1.5"
2024-06-02 04:55:45 +08:00
implementation "com.google.firebase:firebase-admin:9.3.0"
2024-09-16 09:46:08 +08:00
implementation "com.nimbusds:oauth2-oidc-sdk:11.19.1"
2024-06-02 04:55:45 +08:00
implementation "com.rabbitmq:amqp-client:5.21.0"
2023-11-20 07:01:42 +08:00
implementation "com.warrenstrange:googleauth:1.5.0"
2024-06-02 04:55:45 +08:00
implementation "com.google.openlocationcode:openlocationcode:1.0.4"
2023-03-07 03:07:28 +08:00
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
2024-09-16 09:46:08 +08:00
testImplementation "org.mockito:mockito-core:5.13.0"
2019-04-01 13:35:39 +08:00
}
2023-03-07 03:07:28 +08:00
test {
useJUnitPlatform()
}
2024-04-06 09:13:33 +08:00
tasks.register('copyDependencies', Copy) {
2019-04-01 13:35:39 +08:00
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",
2024-09-16 12:17:23 +08:00
"Implementation-Version": "6.5",
2019-04-01 13:35:39 +08:00
"Class-Path": configurations.runtimeClasspath.files.collect { "lib/$it.name" }.join(" "))
}
}