build.gradle 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. testCompile 'junit:junit:4.12'
  41. }