Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Groovy
Posted by: usere4d07
Added: Jun 21, 2020 6:58 AM
Modified: Jan 20, 2021 6:57 AM
Views: 127
Tags: no tags
  1. jar {
  2.     manifest {
  3.         attributes 'Main-Class': 'prsv.ApplicationKt'
  4.     }
  5.  
  6.     from {
  7. //        configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
  8.         configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
  9. //        configurations.compileClasspath.filter { it.exists() }.collect { it.isDirectory() ? it : zipTree(it) }
  10. //              configurations.compileClasspath.filter{ it.exists() && it.name.contains("spigot") }.collect { it.isDirectory() ? it : zipTree(it) }
  11.     }
  12. }
  13.  
  14. task runJar(type: Exec) {
  15.     dependsOn jar
  16.     group = "Execution"
  17.     description = "Run the output executable jar with ExecTask"
  18.     commandLine "java", "-jar", jar.archiveFile.get()
  19. }