Advertisement
Guest User

build.gradle

a guest
Feb 23rd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.02 KB | None | 0 0
  1. plugins {
  2.     id 'application'
  3.     id 'org.openjfx.javafxplugin' version '0.0.7'
  4. }
  5.  
  6. group 'wyalves'
  7. version '1.0.0'
  8.  
  9. mainClassName = 'wyalves.HelloFX'
  10. sourceCompatibility = 1.11
  11.  
  12. repositories {
  13.     mavenCentral()
  14. }
  15.  
  16. javafx {
  17.     version = '11'
  18.  
  19.     modules = ['javafx.controls']
  20. }
  21.  
  22. task fatJar(type: Jar) {
  23.     group = 'application'
  24.     description = 'Assembles a jar archive containing the main classes and all dependencies'
  25.  
  26.     baseName = project.name + '-all'
  27.    
  28.     manifest {
  29.         attributes 'Implementation-Title': 'Simple JavaFX Runnable jar',
  30.                 'Implementation-Version': version,
  31.                 'Built-By': 'Wesley Alves',
  32.                 'Built-Date': new Date(),
  33.                 'Built-JDK': System.getProperty('java.version'),
  34.                 'Main-Class': mainClassName
  35.     }
  36.  
  37.     from {
  38.         configurations.compile.collect {
  39.             it.isDirectory() ? it : zipTree(it)
  40.         }
  41.     } with jar
  42.  
  43.     exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement