knakul853

Untitled

Apr 18th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 7.70 KB | None | 0 0
  1. import org.gradle.internal.os.OperatingSystem
  2.  
  3. plugins {
  4.     id "java"
  5.     id "application"
  6.     id "org.openjfx.javafxplugin" version "0.0.5"
  7.     id "org.javamodularity.moduleplugin" version "1.5.0"
  8.     id "org.beryx.jlink" version "2.17.6"
  9. }
  10.  
  11.  
  12. group = "io.github.mzmine"
  13. version = "3.0"
  14. description = "MZmine"
  15. sourceCompatibility = "14"
  16. targetCompatibility = "14"
  17. defaultTasks 'clean', 'jlinkZip'
  18.  
  19. // Check the OS
  20. project.ext.osSuffix = OperatingSystem.current().getName().replaceAll(" ", "_")
  21. if (OperatingSystem.current().isMacOsX())
  22.     project.ext.osSuffix = "macOS"
  23. if (OperatingSystem.current().isLinux())
  24.     project.ext.osSuffix = "Linux"
  25. if (OperatingSystem.current().isWindows())
  26.     project.ext.osSuffix = "Windows"
  27. println "OS detected as " + project.ext.osSuffix
  28.  
  29. repositories {
  30.     mavenCentral()
  31.  
  32.     maven {
  33.         url = "file://" + projectDir + "/src/main/lib"
  34.     }
  35.  
  36.     maven { // For jmztab 3.0.9+ (https://github.com/PRIDE-Utilities/jmzTab)
  37.         url = "https://dl.bintray.com/lifs/maven/"
  38.     }
  39.     maven { // For jmzml, etc.
  40.         url = "https://www.ebi.ac.uk/Tools/maven/repos/content/groups/ebi-repo/"
  41.     }
  42.     maven {
  43.         url = "https://repo.maven.apache.org/maven2"
  44.     }
  45.     maven { // For SIRIUS ID modules
  46.         url = "https://bio.informatik.uni-jena.de/repository/libs-oss/"
  47.     }
  48.     maven {
  49.         url = "https://jitpack.io"
  50.     }
  51.     maven {
  52.         url = "https://www.xypron.de/repository/"
  53.     }
  54.     maven { // For cpdetector
  55.         url = "https://nexus.nuiton.org/nexus/content/groups/releases/"
  56.     }
  57. }
  58.  
  59. ext {
  60.     msdkVersion = "0.0.27"
  61.     cdkVersion = "2.3"
  62.     jmztabVersion = "3.0.9"
  63.     swaggerVersion = "1.5.22"
  64.     okhttpVersion = "2.7.5"
  65.     guavaVersion = "28.1-jre"
  66.     slf4jVersion = "1.7.28"
  67.     poiVersion = "4.1.0"
  68.     batikVersion = "1.11"
  69.     controlsfxVersion = "11.0.1"
  70. }
  71. dependencies {
  72.     compile 'org.apache.logging.log4j:log4j-core:2.11.1'
  73.     implementation "com.github.graphstream:gs-core:2.0-alpha"
  74.     implementation "com.github.graphstream:gs-ui-javafx:2.0-alpha"
  75.     implementation "org.jfree:jfreechart:1.5.0"
  76.     implementation "org.jfree:jfreechart-fx:1.0.1"
  77.     implementation "org.jfree:fxgraphics2d:1.8"
  78.     implementation "org.jfree:jfreesvg:3.3"
  79.     implementation "com.orsonpdf:orsonpdf:1.9"
  80.     implementation "com.google.guava:guava:$guavaVersion"
  81.     implementation "org.apache.commons:commons-math:2.2"
  82.     implementation "edu.ucar:netcdf4:4.5.5"
  83.     implementation "org.ostermiller:utils:1.07.00"
  84.     implementation "com.google.code.findbugs:jsr305:3.0.2"
  85. //    implementation "nz.ac.waikato.cms.weka:weka-stable:3.8.3"
  86.     implementation "net.sourceforge.jmol:jmol:14.29.27"
  87.     implementation "org.slf4j:slf4j-api:$slf4jVersion"
  88.     implementation "org.slf4j:slf4j-jdk14:$slf4jVersion"
  89.     implementation "org.apache.poi:poi:$poiVersion"
  90.     implementation "org.apache.poi:poi-ooxml:$poiVersion"
  91.     implementation "org.openscience.cdk:cdk-core:$cdkVersion"
  92.     implementation "org.openscience.cdk:cdk-io:$cdkVersion"
  93.     implementation "org.openscience.cdk:cdk-standard:$cdkVersion"
  94.     implementation "org.openscience.cdk:cdk-silent:$cdkVersion"
  95.     implementation "org.openscience.cdk:cdk-formula:$cdkVersion"
  96.     implementation "org.openscience.cdk:cdk-sdg:$cdkVersion"
  97.     implementation "org.openscience.cdk:cdk-renderbasic:$cdkVersion"
  98.     implementation "org.openscience.cdk:cdk-renderawt:$cdkVersion"
  99.     implementation "org.openscience.cdk:cdk-data:$cdkVersion"
  100.     implementation "org.openscience.cdk:cdk-interfaces:$cdkVersion"
  101.     implementation "org.openscience.cdk:cdk-smiles:$cdkVersion"
  102. //    implementation "uk.ac.ebi.jmzml:jmzml:1.7.11"
  103.     implementation "org.postgresql:postgresql:9.3-1102-jdbc41"
  104.     implementation "mysql:mysql-connector-java:5.1.34"
  105.     implementation "org.rsc.chemspider:chemspider-api:1.0.0"
  106.     implementation "org.nuiton.thirdparty:REngine:1.8-5"
  107.     implementation "org.nuiton.thirdparty:Rserve:1.8-5"
  108.     implementation "com.github.jbytecode:RCaller:3.0"
  109. //
  110.     implementation "mzmine:jmprojection:1.0"
  111.     implementation "mzmine:gslibml:0.0.1"
  112. //    compile "uk.ac.ebi.pride:jmztab-modular-model:$jmztabVersion"
  113. //    implementation "uk.ac.ebi.pride:jmztab-modular-util:$jmztabVersion"
  114.     implementation "org.apache.xmlgraphics:fop:1.0"
  115.     implementation "org.freehep:freehep-graphicsio-emf:2.4"
  116.     implementation "io.github.msdk:msdk-io-mzml:$msdkVersion"
  117.     implementation "io.github.msdk:msdk-io-netcdf:$msdkVersion"
  118.     implementation "io.github.msdk:msdk-featuredetection-adap3d:$msdkVersion"
  119.     implementation "io.github.msdk:msdk-id-sirius:$msdkVersion"
  120.     implementation "org.xerial:sqlite-jdbc:3.8.11.2"
  121. //    implementation "org.du-lab.adap:adap:4.1.4"
  122.     implementation "gnf:clustering:20130919"
  123.     implementation "it.unimi.dsi:fastutil:8.2.2"
  124.     implementation "com.itextpdf:itextpdf:5.5.13.1"
  125.     implementation "org.apache.xmlgraphics:xmlgraphics-commons:2.3"
  126.     implementation "org.apache.xmlgraphics:batik-util:$batikVersion"
  127.     implementation "org.apache.xmlgraphics:batik-transcoder:$batikVersion"
  128.     implementation "org.apache.xmlgraphics:batik-codec:$batikVersion"
  129.     implementation "org.apache.xmlgraphics:batik-ext:$batikVersion"
  130. //    implementation "org.apache.xmlgraphics:batik-awt-util:$batikVersion"
  131. //    implementation "org.apache.xmlgraphics:batik-dom:$batikVersion"
  132. //    implementation "org.apache.xmlgraphics:batik-svggen:$batikVersion"
  133. //    implementation "org.apache.xmlgraphics:batik-svg-dom:$batikVersion"
  134. //    implementation "org.apache.xmlgraphics:batik-anim:$batikVersion"
  135. //    implementation "org.apache.xmlgraphics:batik-rasterizer:$batikVersion"
  136. //    implementation "org.apache.xmlgraphics:batik-swing:$batikVersion"
  137. //    implementation "org.apache.xmlgraphics:batik-gui-util:$batikVersion"
  138. //    implementation "org.apache.xmlgraphics:batik-ttf2svg:$batikVersion"
  139. //    implementation "org.apache.xmlgraphics:batik-parser:$batikVersion"
  140. //    implementation "net.sf.epsgraphics:epsgraphics:1.2"
  141. //    implementation "com.miglayout:miglayout:3.7.4"
  142. //    implementation "javax.xml.bind:jaxb-api:2.3.1"
  143. //    implementation "com.sun.xml.bind:jaxb-core:2.3.0.1"
  144. //    implementation "com.sun.xml.bind:jaxb-impl:2.3.2"
  145. //    implementation "javax.activation:javax.activation-api:1.2.0"
  146. //    implementation "javax.mail:javax.mail-api:1.6.2"
  147. //    implementation "io.swagger:swagger-annotations:$swaggerVersion"
  148. //    implementation "com.squareup.okhttp:okhttp:$okhttpVersion"
  149. //    implementation "com.squareup.okhttp:logging-interceptor:$okhttpVersion"
  150. //    implementation "com.google.code.gson:gson:2.8.5"
  151. //    implementation "io.gsonfire:gson-fire:1.8.0"
  152. //    implementation "org.threeten:threetenbp:1.3.8"
  153. //    implementation "org.controlsfx:controlsfx:$controlsfxVersion"
  154. //    implementation "org.drjekyll:fontchooser:2.4"
  155. //    implementation "org.json:json:20190722"
  156. //    implementation "com.panemu:tiwulfx:3.0" // For DetachableTabPane
  157. //    implementation "com.github.oshi:oshi-core:4.5.2" // because the version that is pulled by SIRIUS crashes
  158.  
  159. }
  160.  
  161. javafx {
  162.     version = "14"
  163.     modules = ["javafx.controls",
  164.                "javafx.swing",
  165.                "javafx.fxml",
  166.                "javafx.web",
  167.                "javafx.graphics"
  168.     ]
  169. }
  170.  
  171. //prepareMergedJarsDir.doLast {
  172. //    from dependencies.implementation.collect{zipTree(it)}
  173. //
  174. //}
  175.  
  176. mainClassName = "hellofx/org.openjfx.HelloFX"
  177.  
  178. jlink {
  179.     options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
  180.     launcher {
  181.         name = 'helloFkkX'
  182.     }
  183.     forceMerge('log4j-api')
  184.  
  185. }
  186.  
  187. tasks.jlink.doLast {
  188.     copy {
  189.         from('src/main/resources')
  190.         into("$buildDir/image/bin")
  191.     }
  192. }
Add Comment
Please, Sign In to add comment