Files
WasteInformationServer/build.gradle
T

52 lines
1.2 KiB
Groovy
Raw Normal View History

import java.text.SimpleDateFormat
2019-12-04 10:43:29 +01:00
plugins {
id 'java'
}
2019-12-04 13:09:11 +01:00
group 'com.wasteinformationserver'
2019-12-13 11:12:21 +01:00
version '0.2-Beta'
2019-12-04 10:43:29 +01:00
2019-12-04 13:09:11 +01:00
sourceCompatibility = 1.8
2019-12-04 10:43:29 +01:00
repositories {
mavenCentral()
}
2019-12-08 19:20:48 +01:00
jar {
manifest {
attributes 'Main-Class': 'com.wasteinformationserver.main'
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
2019-12-04 13:09:11 +01:00
sourceSets {
main.java.srcDirs = ['src/java']
main.resources.srcDirs = ['src/resources']
}
2019-12-04 10:43:29 +01:00
dependencies {
2019-12-08 19:20:48 +01:00
compile group: 'org.eclipse.paho', name: 'org.eclipse.paho.client.mqttv3', version: '1.2.2'
2019-12-04 10:43:29 +01:00
compile group: 'mysql',name:'mysql-connector-java',version: '8.0.18'
}
2019-12-08 19:20:48 +01:00
task run (type: JavaExec){
description = "Secure algorythm testing"
main = 'com.wasteinformationserver.main'
classpath = sourceSets.main.runtimeClasspath
2019-12-10 16:43:42 +01:00
}
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())
2019-12-10 16:43:42 +01:00
p.store w, null
}
}
}
classes {
dependsOn createProperties
2019-12-08 19:20:48 +01:00
}