Advertisement
Guest User

Gradle Leap

a guest
Oct 30th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. apply plugin: 'java'
  2. apply plugin: 'scala'
  3. apply plugin: 'idea'
  4. apply plugin: 'application'
  5. apply plugin: 'gradle-one-jar'
  6.  
  7. group = 'uk.co.abp24'
  8. version = '1.0.0'
  9.  
  10. buildscript {
  11. repositories {
  12. mavenCentral()
  13. }
  14. dependencies {
  15. classpath 'com.github.rholder:gradle-one-jar:1.0.4'
  16. }
  17. }
  18.  
  19. repositories {
  20. mavenCentral()
  21. }
  22.  
  23. dependencies {
  24. compile 'org.slf4j:slf4j-api:1.7.5'
  25. compile "org.scala-lang:scala-library:2.11.1"
  26. compile 'org.scala-lang:scala-swing:2.10.3'
  27. compile fileTree(dir: 'lib', include: 'LeapJava.jar')
  28. }
  29.  
  30. run {
  31. main = 'uk.co.abp24.Launch'
  32. standardInput = System.in
  33. jvmArgs = [ "-Djava.library.path=lib"]
  34. }
  35.  
  36. startScripts {
  37. classpath += files('lib/*')
  38. }
  39.  
  40. task copy(type: Copy) {
  41. from 'lib'
  42. into 'build/libs'
  43. include '**/*.dll'
  44. }
  45.  
  46. jar {
  47. archiveName = 'selector.jar'
  48. manifest {
  49. attributes "Main-Class": 'uk.co.abp24.Launch',
  50. "Class-Path": 'lib/LeapJava.jar',
  51. "Implementation-Title": "Selector"
  52. }
  53. }
  54.  
  55. task buildJar(type: OneJar, dependsOn: copy) {
  56. mainClass = 'uk.co.abp24.Launch'
  57. mergeManifestFromJar = true
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement