2019-12-11 12:17:55 +00:00
|
|
|
import java.text.SimpleDateFormat
|
|
|
|
|
2019-12-04 09:43:29 +00:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2020-03-06 07:39:33 +00:00
|
|
|
id 'org.jetbrains.kotlin.jvm' version '1.3.70'
|
2019-12-04 09:43:29 +00:00
|
|
|
}
|
|
|
|
|
2019-12-04 12:09:11 +00:00
|
|
|
group 'com.wasteinformationserver'
|
2020-04-15 15:03:45 +00:00
|
|
|
version '1.1.0'
|
2019-12-04 09:43:29 +00:00
|
|
|
|
2019-12-04 12:09:11 +00:00
|
|
|
sourceCompatibility = 1.8
|
2019-12-04 09:43:29 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2019-12-08 18:20:48 +00:00
|
|
|
jar {
|
|
|
|
manifest {
|
2020-01-23 17:15:41 +00:00
|
|
|
attributes 'Main-Class': 'com.wasteinformationserver.Main'
|
2019-12-08 18:20:48 +00:00
|
|
|
}
|
|
|
|
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
|
|
}
|
|
|
|
|
2019-12-04 12:09:11 +00:00
|
|
|
sourceSets {
|
|
|
|
main.java.srcDirs = ['src/java']
|
|
|
|
main.resources.srcDirs = ['src/resources']
|
|
|
|
}
|
|
|
|
|
2019-12-04 09:43:29 +00:00
|
|
|
dependencies {
|
2019-12-08 18:20:48 +00:00
|
|
|
compile group: 'org.eclipse.paho', name: 'org.eclipse.paho.client.mqttv3', version: '1.2.2'
|
2019-12-04 09:43:29 +00:00
|
|
|
compile group: 'mysql',name:'mysql-connector-java',version: '8.0.18'
|
2020-02-28 11:16:29 +00:00
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
2019-12-04 09:43:29 +00:00
|
|
|
}
|
2019-12-08 18:20:48 +00:00
|
|
|
|
|
|
|
task run (type: JavaExec){
|
|
|
|
description = "Secure algorythm testing"
|
2020-01-20 17:20:37 +00:00
|
|
|
main = 'com.wasteinformationserver.Main'
|
2019-12-08 18:20:48 +00:00
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
2019-12-10 15:43:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task createProperties(dependsOn: processResources) {
|
|
|
|
doLast {
|
2020-04-03 11:26:44 +00:00
|
|
|
new File("$projectDir/src/resources/version.prop").withWriter { w ->
|
2019-12-10 15:43:42 +00:00
|
|
|
Properties p = new Properties()
|
|
|
|
p['version'] = project.version.toString()
|
2019-12-11 12:17:55 +00:00
|
|
|
p['buildtime'] = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(new Date())
|
2019-12-10 15:43:42 +00:00
|
|
|
p.store w, null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-23 18:03:47 +00:00
|
|
|
task myJavadocs(type: Javadoc) {
|
|
|
|
title = "JAVADOC WasteInformationServer"
|
|
|
|
source = sourceSets.main.allJava
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
}
|
|
|
|
|
2019-12-10 15:43:42 +00:00
|
|
|
classes {
|
|
|
|
dependsOn createProperties
|
2020-01-31 08:17:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
compileKotlin {
|
|
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
compileTestKotlin {
|
|
|
|
kotlinOptions.jvmTarget = "1.8"
|
2019-12-08 18:20:48 +00:00
|
|
|
}
|