build.gradle 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. plugins {
  2. id 'java'
  3. }
  4. group 'org.example'
  5. version '1.0-SNAPSHOT'
  6. repositories {
  7. mavenCentral()
  8. }
  9. dependencies {
  10. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
  11. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
  12. // https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
  13. implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
  14. implementation group: 'com.github.docker-java', name: 'docker-java', version: '3.2.11'
  15. implementation group: 'org.jfree', name: 'jfreechart', version: '1.5.3'
  16. }
  17. jar {
  18. duplicatesStrategy = DuplicatesStrategy.INCLUDE
  19. //manifest {
  20. // attributes 'Main-Class': 'parser.DatasetParser'
  21. //}
  22. //from {
  23. // configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
  24. //}
  25. }
  26. task runTestClass(type: Exec) {
  27. dependsOn jar
  28. group = "Execution"
  29. description = "Run the mainClass from the output jar in classpath with ExecTask"
  30. commandLine "java", "-classpath", jar.archiveFile.get(), "analyzer.tests.TestMain"
  31. }
  32. test {
  33. useJUnitPlatform()
  34. }