build.gradle 924 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. test {
  24. ignoreFailures = true
  25. }
  26. //Runs the created Jar
  27. task runIt(dependsOn:jar) {
  28. doLast {
  29. javaexec {
  30. main="-jar"; args jar.archivePath
  31. }
  32. }
  33. }
  34. dependencies {
  35. compile 'org.pcap4j:pcap4j-core:1.+'
  36. compile 'org.pcap4j:pcap4j-packetfactory-static:1.+'
  37. testCompile 'junit:junit:4.12'
  38. }