./build.gradle

Print this page
rev 9237 : 8134725: Gradle openZip task does not support JDK9 layout


3288     def String compressJar = "false"
3289     if (targetProperties.containsKey('deploy') &&
3290         targetProperties.deploy.containsKey('compressBigJar')) {
3291         compressJar = targetProperties.deploy.compressBigJar
3292     }
3293 
3294     def exportTask = project.task("openExport$t.capital", group: "Build") {
3295         dependsOn("sdk$t.capital")
3296 
3297         doLast {
3298             def exportTmp = "${exportDir}/tmp/classes"
3299 
3300             // delete any old exports dir before rebuilding it
3301             file("${exportDir}").deleteDir()
3302 
3303             mkdir "${exportTmp}"
3304 
3305             copy {
3306                 from "${sdkDir}"
3307                 into "${exportSDKDir}"

3308                 exclude '**/jfxrt.jar'
3309 
3310                 if (isWindows) {
3311                     exclude '**/prism_es2.dll'
3312                 }
3313 
3314                 eachFile {details ->
3315                     if (details.path.startsWith('rt/')) {
3316                         details.path = 'jre/' + details.path.substring(3);
3317                     }
3318                 }
3319             }
3320 
3321             copy {
3322                 from zipTree("${jfxrtJar}")
3323                 into "${exportTmp}"
3324             }
3325 
3326             mkdir "${exportSDKDir}/jre/lib/ext"
3327 
3328             ant.jar(
3329                     destfile: "${exportSDKDir}/jre/lib/ext/jfxrt.jar",
3330                     index: true,
3331                     compress: compressJar
3332                 ) {
3333                     delegate.manifest {
3334                       attribute(name: 'Implementation-Title', value: 'OpenJavaFX')
3335                     }
3336 
3337                     fileset(dir: "${exportTmp}") {
3338                        exclude(name:'META-INF/*')
3339                        exclude(name:'com/sun/javafx/tools/ant/*')
3340 
3341                        //-- Obsolete or experimental code --
3342                        exclude(name:'com/sun/embeddedswing/**')
3343                        exclude(name:'com/sun/javafx/tk/glass/**')
3344                        exclude(name:'com/sun/javafx/tk/swing/**')
3345                        exclude(name:'com/sun/prism/null3d/**')
3346                        exclude(name:'com/sun/scenario/scenegraph/**')
3347                        exclude(name:'com/sun/scenario/utils/**')
3348                        exclude(name:'com/sun/webpane/sg/swing/**')
3349                        exclude(name:'com/sun/webpane/swing/**')




3288     def String compressJar = "false"
3289     if (targetProperties.containsKey('deploy') &&
3290         targetProperties.deploy.containsKey('compressBigJar')) {
3291         compressJar = targetProperties.deploy.compressBigJar
3292     }
3293 
3294     def exportTask = project.task("openExport$t.capital", group: "Build") {
3295         dependsOn("sdk$t.capital")
3296 
3297         doLast {
3298             def exportTmp = "${exportDir}/tmp/classes"
3299 
3300             // delete any old exports dir before rebuilding it
3301             file("${exportDir}").deleteDir()
3302 
3303             mkdir "${exportTmp}"
3304 
3305             copy {
3306                 from "${sdkDir}"
3307                 into "${exportSDKDir}"
3308                 includeEmptyDirs = false
3309                 exclude '**/jfxrt.jar'
3310 
3311                 if (isWindows) {
3312                     exclude '**/prism_es2.dll'
3313                 }
3314 
3315                 eachFile {details ->
3316                     if (details.path.startsWith('rt/')) {
3317                         details.path = "./" + details.path.substring(3);
3318                     }
3319                 }
3320             }
3321 
3322             copy {
3323                 from zipTree("${jfxrtJar}")
3324                 into "${exportTmp}"
3325             }
3326 
3327             mkdir "${exportSDKDir}/lib"
3328 
3329             ant.jar(
3330                     destfile: "${exportSDKDir}/lib/jfxrt.jar",
3331                     index: true,
3332                     compress: compressJar
3333                 ) {
3334                     delegate.manifest {
3335                       attribute(name: 'Implementation-Title', value: 'OpenJavaFX')
3336                     }
3337 
3338                     fileset(dir: "${exportTmp}") {
3339                        exclude(name:'META-INF/*')
3340                        exclude(name:'com/sun/javafx/tools/ant/*')
3341 
3342                        //-- Obsolete or experimental code --
3343                        exclude(name:'com/sun/embeddedswing/**')
3344                        exclude(name:'com/sun/javafx/tk/glass/**')
3345                        exclude(name:'com/sun/javafx/tk/swing/**')
3346                        exclude(name:'com/sun/prism/null3d/**')
3347                        exclude(name:'com/sun/scenario/scenegraph/**')
3348                        exclude(name:'com/sun/scenario/utils/**')
3349                        exclude(name:'com/sun/webpane/sg/swing/**')
3350                        exclude(name:'com/sun/webpane/swing/**')