build.gradle 685 B

12345678910111213141516171819202122232425262728293031
  1. apply plugin: 'java'
  2. apply plugin: 'application'
  3. group 'com.lostsys.test.javalin'
  4. version '1.0-SNAPSHOT'
  5. mainClassName = 'com.lostsys.test.javalin.Bench'
  6. sourceCompatibility = 1.8
  7. repositories {
  8. mavenCentral()
  9. }
  10. dependencies {
  11. compile 'io.javalin:javalin:2.3.0'
  12. compile "com.fasterxml.jackson.core:jackson-databind:2.9.6"
  13. compile "org.slf4j:slf4j-simple:1.7.25"
  14. }
  15. //create a single Jar with all dependencies
  16. task fatJar(type: Jar) {
  17. manifest {
  18. attributes(
  19. "Main-Class": mainClassName
  20. )
  21. }
  22. baseName = project.name + '-all'
  23. from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
  24. with jar
  25. }