build.gradle 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. // https://mvnrepository.com/artifact/org.apache.commons/commons-math3
  38. compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
  39. testCompile 'junit:junit:4.12'
  40. }