build.gradle 891 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * This file was generated by the Gradle 'init' task.
  3. *
  4. * This is a general purpose Gradle build.
  5. * Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
  6. */
  7. apply plugin: 'java'
  8. apply plugin: 'eclipse'
  9. apply plugin: 'application'
  10. group = groupName
  11. version = versionNumber
  12. //application allows the Task 'run' which runs the main class
  13. mainClassName = "de.tu_darmstadt.tk.SmartHomeNetworkSim.Main"
  14. repositories {
  15. jcenter()
  16. }
  17. //Creates the Jar
  18. jar {
  19. manifest {
  20. attributes 'Main-Class': 'de.tu_darmstadt.tk.SmartHomeNetworkSim.Main'
  21. }
  22. }
  23. //Runs the created Jar
  24. task runIt(dependsOn:jar) {
  25. doLast {
  26. javaexec {
  27. main="-jar"; args jar.archivePath
  28. }
  29. }
  30. }
  31. dependencies {
  32. compile 'org.pcap4j:pcap4j-core:1.+'
  33. compile 'org.pcap4j:pcap4j-packetfactory-static:1.+'
  34. testCompile 'junit:junit:4.12'
  35. }