Advertisement
Guest User

Untitled

a guest
Jan 20th, 2016
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.99 KB | None | 0 0
  1. buildscript {
  2.     dependencies {
  3.         classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '1.0'
  4.     }
  5.  
  6.     repositories {
  7.         mavenCentral()
  8.     }
  9. }
  10.  
  11. apply plugin: 'java'
  12.  
  13. version = "0.0.001"
  14. group = "com.powerknights.dashboard"
  15. def year = '2016'
  16.  
  17. repositories {
  18.     mavenCentral()
  19. }
  20.  
  21. dependencies {
  22.     compile files("${System.properties['java.home']}/../lib/packager.jar")
  23.     compile 'com.google.code.gson:gson:2.3.1'
  24.     compile fileTree(dir: 'lib', include: '*.jar')
  25. }
  26.  
  27. apply plugin: 'javafx-gradle-plugin'
  28.  
  29. jar {
  30.     /*manifest {
  31.         def requiredProjects = ''
  32.         configurations.compile.getAllDependencies().withType(ProjectDependency).each {dep->
  33.             def dependantProjects = dep.getDependencyProject()
  34.             def projects = project(dependantProjects.path).libsDir.list().findAll{it.endsWith('.jar')}
  35.             projects.removeAll(projects.findAll{it.endsWith('test.jar')})
  36.             def requiredProject = projects.join(' ')
  37.             requiredProjects +=  requiredProject.replaceAll(/ /,'%20') + ' '
  38. //            logger.info 'Required Project: ' + requiredProject
  39.         }
  40. //        logger.info 'Required requiredProjects: ' + requiredProjects
  41.  
  42.         def compileFiles = configurations.compile.files{ it instanceof ExternalDependency }.collect  {
  43.             File file = it
  44.             "lib/${file.name}"
  45.         }.join(' ')
  46.  
  47.         def manifestPath = requiredProjects + compileFiles
  48. //        logger.info 'Manifest: '+ manifestPath
  49.         attributes 'Main-Class': "com.powerknights.dashboard.Launcher"
  50.         attributes 'Class-Path': manifestPath
  51.         attributes 'Build-date': new Date();
  52.         attributes 'Application-Version': project.version
  53.     }*/
  54. }
  55.  
  56. jfx{
  57.     appName = 'Smart Dashboard ' + project.version
  58.     mainClass = 'com.powerknights.dashboard.Launcer'
  59.  
  60.     jfxMainAppJarName = 'FRCSmarDashboard-' + year + '-' + project.version + '.jar'
  61.  
  62.     bundler = 'windows.app'
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement