WasteInformationServer/build.gradle
lukas-heiligenbrunner 7207f39892 Version 0.3.1-Beta
2020-01-23 18:06:03 +01:00

52 lines
1.2 KiB
Groovy

import java.text.SimpleDateFormat
plugins {
id 'java'
}
group 'com.wasteinformationserver'
version '0.3.1-Beta'
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'
}
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.properties").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
}
}
}
classes {
dependsOn createProperties
}