plugins {
|
id 'java'
|
}
|
|
description = 'borgbutler-server'
|
|
dependencies {
|
compile project(':borgbutler-core')
|
// https://mvnrepository.com/artifact/org.apache.commons/commons-text
|
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.6'
|
implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.2'
|
implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.18'
|
implementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
|
|
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
|
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.4.5'
|
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin', version: '2.12.3'
|
|
implementation 'io.github.microutils:kotlin-logging-jvm:2.0.6'
|
|
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
|
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
|
|
// https://mvnrepository.com/artifact/commons-cli/commons-cli
|
implementation group: 'commons-cli', name: 'commons-cli', version: '1.4'
|
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.21.0'
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
}
|
|
repositories {
|
mavenCentral()
|
jcenter()
|
}
|
|
sourceSets {
|
main.java.srcDirs += 'src/main/java'
|
main.java.srcDirs += 'src/main/kotlin'
|
}
|
|
apply plugin: 'application'
|
mainClassName = 'de.micromata.borgbutler.server.BorgButlerApplication'
|
|
run() {
|
}
|
|
run.dependsOn ':borgbutler-webapp:npmBuild'
|
// run.dependsOn ':borgbutler-docs:buildWebDoc'
|
|
apply plugin: 'distribution'
|
|
task createVersionProperties(dependsOn: processResources) {
|
doLast {
|
new File("$buildDir/resources/main/version.properties").withWriter { w ->
|
Properties p = new Properties()
|
p['version'] = project.version.toString()
|
p['name'] = project.name
|
p['build.date.millis'] = '' + System.currentTimeMillis()
|
p.store w, null
|
}
|
}
|
}
|
|
classes {
|
dependsOn createVersionProperties
|
}
|
|
// Builds the distribution
|
distributions {
|
main {
|
contents {
|
// Prepared by nbmBuild:
|
from ("${project(':borgbutler-webapp').projectDir}/build") {
|
into 'web'
|
}
|
}
|
}
|
}
|
|
distZip.dependsOn ':borgbutler-webapp:npmBuild'
|
//distZip.dependsOn ':borgbutler-docs:buildWebDoc'
|
task(dist).dependsOn distZip
|