WasteInformationServer/build.gradle

67 lines
1.6 KiB
Groovy
Raw Normal View History

import java.text.SimpleDateFormat
plugins {
id 'java'
2020-03-06 07:39:33 +00:00
id 'org.jetbrains.kotlin.jvm' version '1.3.70'
}
2019-12-04 12:09:11 +00:00
group 'com.wasteinformationserver'
2020-02-28 10:59:16 +00:00
version '1.0.0'
2019-12-04 12:09:11 +00:00
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
jar {
manifest {
2020-01-23 17:15:41 +00:00
attributes 'Main-Class': 'com.wasteinformationserver.Main'
}
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']
}
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'
2020-02-28 11:16:29 +00:00
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
task run (type: JavaExec){
description = "Secure algorythm testing"
2020-01-20 17:20:37 +00:00
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
}
}
}
2020-01-23 18:03:47 +00:00
task myJavadocs(type: Javadoc) {
title = "JAVADOC WasteInformationServer"
source = sourceSets.main.allJava
classpath = sourceSets.main.runtimeClasspath
}
classes {
dependsOn createProperties
2020-01-31 08:17:12 +00:00
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}