mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
17.24.2021 274c48211e8870196964161ac903725389f8e301
borgbutler-server/build.gradle
@@ -1,16 +1,5 @@
buildscript {
    ext.kotlin_version = '1.4.32'
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
plugins {
    id 'java'
    id 'org.springframework.boot' version '2.4.5'
}
description = 'borgbutler-server'
@@ -35,7 +24,7 @@
    // 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:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
repositories {
@@ -43,16 +32,15 @@
    jcenter()
}
sourceSets {
    main.java.srcDirs += 'src/main/java'
    main.java.srcDirs += 'src/main/kotlin'
}
apply plugin: 'application'
apply plugin: 'kotlin'
mainClassName = "de.micromata.borgbutler.server.BorgButlerApplication"
mainClassName = 'de.micromata.borgbutler.server.BorgButlerApplication'
run() {
    doFirst {
        jvmArgs = [
                "-DapplicationHome=${rootDir}"
        ]
    }
}
run.dependsOn ':borgbutler-webapp:npmBuild'
@@ -76,16 +64,6 @@
    dependsOn createVersionProperties
}
// Ugly work arround for getting the applications home dir:
applicationDefaultJvmArgs = ["-DapplicationHome=MY_APPLICATION_HOME"]
startScripts {
    doLast {
        unixScript.text = unixScript.text.replace('MY_APPLICATION_HOME', '\$APP_HOME')
        windowsScript.text = windowsScript.text.replace('MY_APPLICATION_HOME', '%~dp0..')
    }
}
// Builds the distribution
distributions {
    main {
@@ -94,10 +72,6 @@
            from ("${project(':borgbutler-webapp').projectDir}/build") {
                into 'web'
            }
            // Containing test templates and other stuff:
            from ("${rootProject.projectDir}/examples") {
                into 'examples'
            }
        }
    }
}
@@ -105,13 +79,3 @@
distZip.dependsOn ':borgbutler-webapp:npmBuild'
//distZip.dependsOn ':borgbutler-docs:buildWebDoc'
task(dist).dependsOn distZip
compileKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}
compileTestKotlin {
    kotlinOptions {
        jvmTarget = "1.9"
    }
}