| | |
| | | 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' |
| | |
| | | // 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 { |
| | |
| | | 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' |
| | |
| | | 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 { |
| | |
| | | from ("${project(':borgbutler-webapp').projectDir}/build") { |
| | | into 'web' |
| | | } |
| | | // Containing test templates and other stuff: |
| | | from ("${rootProject.projectDir}/examples") { |
| | | into 'examples' |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | distZip.dependsOn ':borgbutler-webapp:npmBuild' |
| | | //distZip.dependsOn ':borgbutler-docs:buildWebDoc' |
| | | task(dist).dependsOn distZip |
| | | compileKotlin { |
| | | kotlinOptions { |
| | | jvmTarget = "1.8" |
| | | } |
| | | } |
| | | compileTestKotlin { |
| | | kotlinOptions { |
| | | jvmTarget = "1.9" |
| | | } |
| | | } |