You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. plugins {
  2. id 'java'
  3. }
  4. group 'org.eseb'
  5. version '1.0-SNAPSHOT'
  6. repositories {
  7. mavenCentral()
  8. }
  9. dependencies {
  10. compile 'com.github.cliftonlabs:json-simple:3.1.1'
  11. }
  12. dependencies {
  13. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
  14. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
  15. }
  16. //create a single Jar with all dependencies
  17. task fatJar(type: Jar) {
  18. manifest {
  19. attributes 'Implementation-Title': 'Gradle Jar Package',
  20. 'Implementation-Version': version,
  21. 'Main-Class': 'Application'
  22. }
  23. baseName = project.name
  24. from {
  25. configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
  26. }
  27. from('src/main/java'){
  28. include 'resources/*'
  29. }
  30. with jar
  31. }
  32. test {
  33. useJUnitPlatform()
  34. }