Advertisement
cwchen

build.gradle example

Apr 15th, 2016
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.77 KB | None | 0 0
  1. apply plugin: 'groovy'
  2. apply plugin: 'application'
  3.  
  4. version = '1.0'
  5.  
  6. repositories {
  7.     maven  {
  8.         url "http://repo1.maven.org/maven2"
  9.     }
  10. }
  11.  
  12. sourceSets {
  13.     main {
  14.         groovy {
  15.           srcDir 'src/groovy'
  16.         }
  17.         resources {
  18.           srcDir 'src/resources'
  19.         }
  20.     }
  21. }
  22.  
  23. dependencies {
  24.     compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.6'
  25.     compile group: 'commons-cli', name: 'commons-cli', version: '1.3.1'
  26. }
  27.  
  28. task uberjar(type: Jar, dependsOn:[':compileJava', ':compileGroovy', ':processResources']) {
  29.     from files(sourceSets.main.output.classesDir)
  30.     from configurations.runtime.asFileTree.files.collect { zipTree(it) }
  31.  
  32.     manifest {
  33.         attributes 'Main-Class': 'SomeClass'
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement