WasteInformationServer/build.gradle
lukas-heiligenbrunner 3fba0f9933 version 1.1.0
method name convention
2020-04-15 17:03:45 +02:00

67 lines
1.6 KiB
Groovy

import java.text.SimpleDateFormat
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.70'
}
group 'com.wasteinformationserver'
version '1.1.0'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
jar {
manifest {
attributes 'Main-Class': 'com.wasteinformationserver.Main'
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
sourceSets {
main.java.srcDirs = ['src/java']
main.resources.srcDirs = ['src/resources']
}
dependencies {
compile group: 'org.eclipse.paho', name: 'org.eclipse.paho.client.mqttv3', version: '1.2.2'
compile group: 'mysql',name:'mysql-connector-java',version: '8.0.18'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
task run (type: JavaExec){
description = "Secure algorythm testing"
main = 'com.wasteinformationserver.Main'
classpath = sourceSets.main.runtimeClasspath
}
task createProperties(dependsOn: processResources) {
doLast {
new File("$projectDir/src/resources/version.prop").withWriter { w ->
Properties p = new Properties()
p['version'] = project.version.toString()
p['buildtime'] = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(new Date())
p.store w, null
}
}
}
task myJavadocs(type: Javadoc) {
title = "JAVADOC WasteInformationServer"
source = sourceSets.main.allJava
classpath = sourceSets.main.runtimeClasspath
}
classes {
dependsOn createProperties
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}