build.gradle 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. //compile group: 'nz.ac.waikato.cms.weka', name: 'weka-stable', version: '3.8.0'
  40. compile fileTree(include: ['*.jar'], dir: 'libs')
  41. testCompile 'junit:junit:4.12'
  42. }