aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
blob: a0be04f8c1fad414abb5d7fbb303db5d6e5edce0 (plain)
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
113
plugins {
    id "java"
    id "checkstyle"
    id "com.google.protobuf" version "0.8.19"
    id "org.kordamp.gradle.project-enforcer" version "0.10.0"
}

repositories {
    mavenCentral()
}

sourceCompatibility = "11"
compileJava.options.encoding = "UTF-8"
jar.destinationDirectory = file("$projectDir/target")

checkstyle {
    toolVersion = "10.3.4"
    configFile = "gradle/checkstyle.xml" as File
    checkstyleTest.enabled = false
}

enforce {
    rule(enforcer.rules.EnforceBytecodeVersion) { r ->
        r.maxJdkVersion = "11"
    }
}

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"
    junitVersion = "5.9.2"
}

protobuf {
    protoc {
        artifact = "com.google.protobuf:protoc:$protobufVersion"
    }
}

dependencies {
    implementation "commons-codec:commons-codec:1.15"
    implementation "com.h2database:h2:2.1.214"
    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"
    implementation "com.zaxxer:HikariCP:5.0.1"
    implementation "io.netty:netty-all:4.1.87.Final"
    implementation "org.slf4j:slf4j-jdk14:2.0.6"
    implementation "com.google.inject:guice:$guiceVersion"
    implementation "com.google.inject.extensions:guice-servlet:$guiceVersion"
    implementation "org.owasp.encoder:encoder:1.2.3"
    implementation "org.glassfish:jakarta.json:1.1.6"
    implementation "org.eclipse.jetty:jetty-server:$jettyVersion"
    implementation "org.eclipse.jetty:jetty-servlet:$jettyVersion"
    implementation "org.eclipse.jetty:jetty-servlets:$jettyVersion"
    implementation "org.eclipse.jetty:jetty-webapp:$jettyVersion"
    implementation "org.eclipse.jetty:jetty-jndi:$jettyVersion"
    implementation "org.eclipse.jetty:jetty-proxy:$jettyVersion"
    implementation "org.eclipse.jetty.websocket:websocket-jetty-server:$jettyVersion"
    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"
    implementation "org.glassfish.hk2:guice-bridge:2.6.1" // same version as jersey-hk2
    implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jacksonVersion"
    implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr353:$jacksonVersion"
    implementation "org.liquibase:liquibase-core:4.19.0"
    implementation "com.sun.mail:jakarta.mail:1.6.7"
    implementation "org.apache.commons:commons-jexl3:3.3"
    implementation "org.jxls:jxls:$jxlsVersion"
    implementation "org.jxls:jxls-poi:$jxlsVersion"
    implementation "org.apache.velocity:velocity-engine-core:2.3"
    implementation "org.apache.velocity.tools:velocity-tools-generic:3.1"
    implementation "org.apache.commons:commons-collections4:4.4"
    implementation "org.mnode.ical4j:ical4j:3.2.8"
    implementation "org.locationtech.spatial4j:spatial4j:0.8"
    implementation "org.locationtech.jts:jts-core:1.19.0"
    implementation "net.java.dev.jna:jna-platform:5.13.0"
    implementation "com.github.jnr:jnr-posix:3.1.16"
    implementation "com.google.protobuf:protobuf-java:$protobufVersion"
    implementation "javax.activation:activation:1.1.1"
    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"
    implementation "redis.clients:jedis:4.3.1"
    implementation "com.google.firebase:firebase-admin:9.1.1"
    implementation "com.nimbusds:oauth2-oidc-sdk:10.7.1"
    testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
    testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
    testImplementation "org.mockito:mockito-core:5.1.1"
}

test {
    useJUnitPlatform()
}

task copyDependencies(type: Copy) {
    into "$projectDir/target/lib"
    from configurations.runtimeClasspath
}
assemble.dependsOn(copyDependencies)

jar {
    manifest {
        attributes(
                "Main-Class": "org.traccar.Main",
                "Implementation-Version": "5.6",
                "Class-Path": configurations.runtimeClasspath.files.collect { "lib/$it.name" }.join(" "))
    }
}