|
@@ -7,18 +7,37 @@
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
apply plugin: 'eclipse'
|
|
|
+apply plugin: 'application'
|
|
|
|
|
|
group = groupName
|
|
|
version = versionNumber
|
|
|
|
|
|
+//application allows the Task 'run' which runs the main class
|
|
|
+mainClassName = "de.tu_darmstadt.tk.SmartHomeNetworkSim.Main"
|
|
|
+
|
|
|
repositories {
|
|
|
jcenter()
|
|
|
}
|
|
|
|
|
|
+//Creates the Jar
|
|
|
+jar {
|
|
|
+ manifest {
|
|
|
+ attributes 'Main-Class': 'de.tu_darmstadt.tk.SmartHomeNetworkSim.Main'
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//Runs the created Jar
|
|
|
+task runIt(dependsOn:jar) {
|
|
|
+ doLast {
|
|
|
+ javaexec {
|
|
|
+ main="-jar"; args jar.archivePath
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
dependencies {
|
|
|
compile 'org.pcap4j:pcap4j-core:1.+'
|
|
|
compile 'org.pcap4j:pcap4j-packetfactory-static:1.+'
|
|
|
|
|
|
testCompile 'junit:junit:4.12'
|
|
|
}
|
|
|
-
|