build.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. // https://docs.gradle.org/7.0.2/userguide/upgrading_version_6.html#jcenter_deprecation
  16. mavenCentral()
  17. }
  18. //Creates the Jar
  19. jar {
  20. manifest {
  21. attributes 'Main-Class': 'de.tu_darmstadt.tk.SmartHomeNetworkSim.Main'
  22. }
  23. }
  24. test {
  25. ignoreFailures = true
  26. }
  27. //Runs the created Jar
  28. task runIt(dependsOn:jar) {
  29. doLast {
  30. javaexec {
  31. main="-jar"; args jar.archivePath
  32. }
  33. }
  34. }
  35. dependencies { // https://stackoverflow.com/a/44493379
  36. implementation 'org.pcap4j:pcap4j-core:1.+'
  37. implementation 'org.pcap4j:pcap4j-packetfactory-static:1.+'
  38. // https://mvnrepository.com/artifact/org.apache.commons/commons-math3
  39. implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
  40. //implementation group: 'nz.ac.waikato.cms.weka', name: 'weka-stable', version: '3.8.0'
  41. implementation fileTree(include: ['*.jar'], dir: 'libs')
  42. testImplementation 'junit:junit:4.12'
  43. }