mirror of
https://github.com/linuxserver/fleet.git
synced 2026-02-20 05:11:08 +08:00
86 lines
2.5 KiB
Groovy
86 lines
2.5 KiB
Groovy
plugins {
|
|
id 'java'
|
|
}
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
version = '2.3.3'
|
|
|
|
dependencies {
|
|
|
|
// Logging
|
|
implementation 'org.apache.logging.log4j:log4j-api:2.19.0'
|
|
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
|
|
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.19.0'
|
|
|
|
// HTTP Framework
|
|
implementation 'io.javalin:javalin:3.6.0'
|
|
implementation 'org.freemarker:freemarker:2.3.31'
|
|
implementation 'org.apache.httpcomponents:httpclient:4.5.13'
|
|
|
|
// JSON Mapping/Marshalling
|
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.6'
|
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.6'
|
|
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.6'
|
|
|
|
// Database
|
|
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:3.0.6'
|
|
implementation 'org.flywaydb:flyway-core:8.2.0'
|
|
implementation 'com.zaxxer:HikariCP:5.0.1'
|
|
|
|
// MISC
|
|
implementation 'org.apache.commons:commons-lang3:3.12.0'
|
|
|
|
// Unit Testing
|
|
testImplementation 'junit:junit:4.11'
|
|
testImplementation 'org.mockito:mockito-core:4.8.0'
|
|
}
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
attributes "Main-Class": "io.linuxserver.fleet.core.Main"
|
|
}
|
|
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
|
|
|
exclude 'META-INF/INDEX.LIST', 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
|
|
}
|
|
|
|
task configureLogConfiguration(type: Copy) {
|
|
|
|
def logFile = project.hasProperty('env') ? "${env}" : 'local'
|
|
|
|
from "config/log4j2.${logFile}.xml"
|
|
into 'src/main/resources'
|
|
rename "log4j2.${logFile}.xml", 'log4j2.xml'
|
|
}
|
|
|
|
task buildVersionProperties() {
|
|
|
|
doFirst {
|
|
|
|
def versionProperties = new Properties()
|
|
def propFile = new File("src/main/resources/version.properties")
|
|
|
|
versionProperties.load(propFile.newDataInputStream());
|
|
versionProperties.setProperty("app.version", project.version.toString())
|
|
versionProperties.setProperty("app.build.user", System.getProperty("user.name"))
|
|
versionProperties.setProperty("app.build.date", new Date().format("yyyy-MM-dd'T'HH:mm:ss"))
|
|
versionProperties.setProperty("app.build.os", System.getProperty("os.name"))
|
|
|
|
versionProperties.store(propFile.newWriter(), null)
|
|
}
|
|
}
|
|
|
|
processResources.dependsOn configureLogConfiguration, buildVersionProperties
|