< prev index next >

./build.gradle

Print this page
rev 10424 : 8090969: Remove lens implementation in Glass
Reviewed-by:


 578     if (doFetch) {
 579         // create a unique configuration for this fetch
 580         def String fetchToolsConfig = "fetchTools$configName"
 581         rootProject.configurations.create(fetchToolsConfig)
 582 
 583         def List<String> fetchedPackages = []
 584         def int fetchCount = 0
 585 
 586         packages.each { pkgname->
 587             def int dotdex = pkgname.lastIndexOf('.')
 588             def int dashdex = pkgname.lastIndexOf('-')
 589             def String basename = pkgname.substring(0,dashdex)
 590             def String ver = pkgname.substring(dashdex+1,dotdex)
 591             def String ext = pkgname.substring(dotdex+1)
 592             def File pkgdir = file("$destdir/$basename-$ver")
 593 
 594             if (!pkgdir.isDirectory()) {
 595                 rootProject.dependencies.add(fetchToolsConfig, "javafx:$basename:$ver", {
 596                     artifact {
 597                         name = basename
 598                         version = ver
 599                         type = ext
 600                     }
 601                 })
 602                 println "adding $pkgname as a downloadable item did not find $pkgdir"
 603                 fetchedPackages.add(pkgname)
 604                 fetchCount++
 605             }
 606         }
 607 
 608         //fetch all the missing packages
 609         if (fetchedPackages.size > 0) {
 610             destdir.mkdirs()
 611 
 612             logger.quiet "fetching missing packages $fetchedPackages"
 613             copy {
 614                 from rootProject.configurations[fetchToolsConfig]
 615                 into destdir
 616             }
 617 
 618             // unpack the fetched packages


 689     exec {
 690         workingDir = dir
 691         environment("JDK_HOME", JDK_HOME)
 692         environment("JAVA_HOME", JDK_HOME)
 693         if (IS_WINDOWS) {
 694             environment([
 695                     "VCINSTALLDIR"         : WINDOWS_VS_VCINSTALLDIR,
 696                     "VSINSTALLDIR"         : WINDOWS_VS_VSINSTALLDIR,
 697                     "DEVENVDIR"            : WINDOWS_VS_DEVENVDIR,
 698                     "MSVCDIR"              : WINDOWS_VS_MSVCDIR,
 699                     "INCLUDE"              : WINDOWS_VS_INCLUDE,
 700                     "LIB"                  : WINDOWS_VS_LIB,
 701                     "LIBPATH"              : WINDOWS_VS_LIBPATH,
 702                     "DXSDK_DIR"            : WINDOWS_DXSDK_DIR
 703             ]);
 704             commandLine "cmd", "/c", ant, "-Dbuild.compiler=javac1.7"
 705         } else {
 706             commandLine ant, "-Dbuild.compiler=javac1.7"
 707         }
 708         if ((conf != null) && !rootProject.defaultHostTarget.equals(conf)) {
 709             def targetProperties = rootProject.ext[t.trim().toUpperCase()]
 710             args("-Dcross.platform=$conf")
 711             if (targetProperties.containsKey('arch')) {
 712                 args("-Dcross.platform.arch=${targetProperties.arch}")
 713             }
 714         }
 715         if (params != null) {
 716             params.each() { s->
 717                 args(s)
 718             }
 719         }
 720         args(target);
 721     }
 722 }
 723 
 724 List<String> computeLibraryPath(boolean working) {
 725     List<String> lp = []
 726     List<String> modsWithNative = [ 'graphics', 'media', 'web' ]
 727 
 728     // the build/modular-sdk area
 729     def platformPrefix = ""


 971 compileTargets { t ->
 972     def targetProperties = project.rootProject.ext[t.upper]
 973 
 974     if (targetProperties.compileSwing) COMPILE_SWING = true
 975     if (targetProperties.compileSWT) COMPILE_SWT = true
 976     if (IS_BUILD_FXPACKAGER && targetProperties.compileFXPackager) COMPILE_FXPACKAGER = true
 977 
 978     if (!targetProperties.containsKey('compileWebnodeNative')) {
 979         // unless specified otherwise, we will compile native Webnode if IS_COMPILE_WEBKIT
 980         targetProperties.compileWebnodeNative = true
 981     }
 982 
 983     if (!targetProperties.containsKey('compileMediaNative')) {
 984         // unless specified otherwise, we will compile native Media if IS_COMPILE_MEDIA
 985         targetProperties.compileMediaNative = true
 986     }
 987 
 988     if (!targetProperties.containsKey('includeSWT')) targetProperties.includeSWT = true
 989     if (!targetProperties.containsKey('includeSwing')) targetProperties.includeSwing = true
 990     if (!targetProperties.containsKey('includeNull3d')) targetProperties.includeNull3d = true
 991     if (!targetProperties.containsKey('includeLens')) targetProperties.includeLens = false
 992     if (!targetProperties.containsKey('includeMonocle')) targetProperties.includeMonocle = false
 993     if (!targetProperties.containsKey('includeEGL')) targetProperties.includeEGL = false
 994 
 995     if (!targetProperties.containsKey('includeGTK')) targetProperties.includeGTK = IS_LINUX
 996 
 997     if (!targetProperties.containsKey('modLibDest')) targetProperties.modLibDest = targetProperties.libDest
 998 
 999     // This value is used as a prefix for various directories under ./build,
1000     // such as sdk, to allow for a common name for the hosted build
1001     // (for use when building apps) and a unique name for cross builds.
1002     if (rootProject.defaultHostTarget.equals(t.name)) {
1003         // use a simple common default for the "host" build
1004         targetProperties.platformPrefix=""
1005     } else {
1006         // and a more complex one for cross builds
1007         targetProperties.platformPrefix="${t.name}-"
1008     }
1009 }
1010 
1011 /******************************************************************************


2527                     environment(WINDOWS_NATIVE_COMPILE_ENVIRONMENT)
2528                 })
2529             }
2530         }
2531 
2532         task copyJavaPackager(type: Copy, group: "Build", dependsOn: linkJavaPackager) {
2533             from file("$buildDir/native/javapackager/javapackager.exe")
2534             into file("$buildDir/javapackager")
2535         }
2536 
2537         task buildJavaPackager(dependsOn: [copyJavaPackager])
2538     } else {
2539         task buildJavaPackager(type: Copy, group: "Build") {
2540             enabled = COMPILE_FXPACKAGER
2541             from "src/main/native/javapackager/shell"
2542             into "$buildDir/javapackager"
2543             fileMode = 0755
2544         }
2545     }
2546 

2547     assemble.dependsOn compileLauncher;
2548     assemble.dependsOn buildJavaPackager

2549 
2550     classes << {
2551         // Copy all of the download libraries to libs directory for the sake of the IDEs
2552         File libsDir = rootProject.file("build/libs");
2553         File antLib = new File(libsDir, "ant-1.8.2.jar")
2554         libsDir.mkdirs();
2555 
2556         // Skip copy if file is present.
2557         if (antLib.exists()) return;
2558 
2559         for (File f : configurations.compile.files) {
2560             copy {
2561                 into libsDir
2562                 from f.getParentFile()
2563                 include "**/ant-1.8.2.jar"
2564                 includeEmptyDirs = false
2565             }
2566         }
2567     }
2568 


4032                     exclude ("**/*.hlsl",
4033                              "com/sun/glass/ui/win",
4034                              "com/sun/prism/d3d",
4035                              "com/sun/prism/es2/WinGL*",
4036                              "com/sun/scenario/effect/impl/hw/d3d"
4037                              )
4038                 }
4039 
4040                 if (!targetProperties.includeGTK) { //usually IS_LINUX
4041                     exclude (
4042                              "com/sun/glass/ui/gtk",
4043                              "com/sun/prism/es2/EGL*",
4044                              "com/sun/prism/es2/X11GL*"
4045                              )
4046                 }
4047 
4048                 if (!targetProperties.includeEGL) {
4049                     exclude ("com/sun/prism/es2/EGL*")
4050                 }
4051 
4052                 if (!targetProperties.includeLens) {
4053                     exclude ("com/sun/glass/ui/lens")
4054                 }
4055 
4056                 if (!targetProperties.includeMonocle) {
4057                     exclude ("com/sun/glass/ui/monocle")
4058                     exclude("com/sun/prism/es2/Monocle*")
4059                 }
4060 
4061                 if (t.name != 'ios') {
4062                     exclude ("com/sun/media/jfxmediaimpl/platform/ios",
4063                              "com/sun/glass/ui/ios",
4064                              "com/sun/prism/es2/IOS*"
4065                              )
4066                 }
4067 
4068                 if (t.name != 'android' && t.name != 'dalvik') {
4069                     exclude ("com/sun/glass/ui/android")
4070                 }
4071 
4072                 // Filter out other platform-specific classes
4073                 if (targetProperties.containsKey('jfxrtJarExcludes')) {
4074                     exclude(targetProperties.jfxrtJarExcludes)
4075                 }


4110 
4111         def packagerProject = project(":fxpackager");
4112         dependsOn(packagerProject.assemble)
4113         dependsOn(packagerProject.jar)
4114         dependsOn(project(":fxpackagerservices").jar)
4115 
4116         def library = targetProperties.library
4117 
4118         def useLipo = targetProperties.containsKey('useLipo') ? targetProperties.useLipo : false
4119         def modLibDest = targetProperties.modLibDest
4120         def moduleNativeDirName = "${platformPrefix}module-$modLibDest"
4121 
4122         def buildModuleBaseTask = task("buildModuleBase$t.capital", dependsOn: baseProject.assemble) {
4123             group = "Basic"
4124             description = "creates javafx.base property files"
4125 
4126             def moduleLibDir = "${baseProject.buildDir}/${platformPrefix}module-lib"
4127             final File javafxProperties = file("${moduleLibDir}/javafx.properties")
4128             outputs.file(javafxProperties)
4129 





4130             doLast {
4131                 mkdir moduleLibDir
4132 
4133                 javafxProperties.delete()
4134                 javafxProperties << "javafx.version=$RELEASE_VERSION_SHORT";
4135                 javafxProperties << "\n"
4136                 javafxProperties << "javafx.runtime.version=$RELEASE_VERSION_LONG";
4137                 javafxProperties << "\n"
4138                 javafxProperties << "javafx.runtime.build=$PROMOTED_BUILD_NUMBER";
4139                 javafxProperties << "\n"
4140                 // Include any properties that have been defined (most likely in
4141                 // one of the various platform gradle files)
4142                 if (targetProperties.containsKey("javafxProperties")) {
4143                     javafxProperties << targetProperties.javafxProperties
4144                     javafxProperties << "\n"
4145                 }
4146 
4147                 // Embedded builds define this file as well
4148                 if (targetProperties.containsKey("javafxPlatformProperties")) {
4149                     final File javafxPlatformProperties = file("${moduleLibDir}/javafx.platform.properties")
4150                     outputs.file(javafxPlatformProperties)
4151 
4152                     javafxPlatformProperties.delete()
4153                     javafxPlatformProperties << targetProperties.javafxPlatformProperties
4154                     javafxPlatformProperties << "\n"
4155                 }
4156             }
4157         }
4158 
4159         def buildModuleGraphicsTask = task("buildModuleGraphics$t.capital", type: Copy, dependsOn: graphicsProject.assemble) {
4160             group = "Basic"
4161             description = "copies javafx.graphics native libraries"
4162 
4163             into "${graphicsProject.buildDir}/${moduleNativeDirName}"
4164 
4165             from("${graphicsProject.buildDir}/libs/jsl-decora/${t.name}/${library(targetProperties.decora.lib)}")
4166             def libs = ['font', 'prism', 'prismSW', 'glass', 'iio']
4167             if (IS_INCLUDE_ES2) {
4168                 libs += ['prismES2'];
4169             }
4170             if (IS_COMPILE_PANGO) {
4171                 libs += ['fontFreetype', 'fontPango'];




 578     if (doFetch) {
 579         // create a unique configuration for this fetch
 580         def String fetchToolsConfig = "fetchTools$configName"
 581         rootProject.configurations.create(fetchToolsConfig)
 582 
 583         def List<String> fetchedPackages = []
 584         def int fetchCount = 0
 585 
 586         packages.each { pkgname->
 587             def int dotdex = pkgname.lastIndexOf('.')
 588             def int dashdex = pkgname.lastIndexOf('-')
 589             def String basename = pkgname.substring(0,dashdex)
 590             def String ver = pkgname.substring(dashdex+1,dotdex)
 591             def String ext = pkgname.substring(dotdex+1)
 592             def File pkgdir = file("$destdir/$basename-$ver")
 593 
 594             if (!pkgdir.isDirectory()) {
 595                 rootProject.dependencies.add(fetchToolsConfig, "javafx:$basename:$ver", {
 596                     artifact {
 597                         name = basename

 598                         type = ext
 599                     }
 600                 })
 601                 println "adding $pkgname as a downloadable item did not find $pkgdir"
 602                 fetchedPackages.add(pkgname)
 603                 fetchCount++
 604             }
 605         }
 606 
 607         //fetch all the missing packages
 608         if (fetchedPackages.size > 0) {
 609             destdir.mkdirs()
 610 
 611             logger.quiet "fetching missing packages $fetchedPackages"
 612             copy {
 613                 from rootProject.configurations[fetchToolsConfig]
 614                 into destdir
 615             }
 616 
 617             // unpack the fetched packages


 688     exec {
 689         workingDir = dir
 690         environment("JDK_HOME", JDK_HOME)
 691         environment("JAVA_HOME", JDK_HOME)
 692         if (IS_WINDOWS) {
 693             environment([
 694                     "VCINSTALLDIR"         : WINDOWS_VS_VCINSTALLDIR,
 695                     "VSINSTALLDIR"         : WINDOWS_VS_VSINSTALLDIR,
 696                     "DEVENVDIR"            : WINDOWS_VS_DEVENVDIR,
 697                     "MSVCDIR"              : WINDOWS_VS_MSVCDIR,
 698                     "INCLUDE"              : WINDOWS_VS_INCLUDE,
 699                     "LIB"                  : WINDOWS_VS_LIB,
 700                     "LIBPATH"              : WINDOWS_VS_LIBPATH,
 701                     "DXSDK_DIR"            : WINDOWS_DXSDK_DIR
 702             ]);
 703             commandLine "cmd", "/c", ant, "-Dbuild.compiler=javac1.7"
 704         } else {
 705             commandLine ant, "-Dbuild.compiler=javac1.7"
 706         }
 707         if ((conf != null) && !rootProject.defaultHostTarget.equals(conf)) {
 708             def targetProperties = rootProject.ext[conf.trim().toUpperCase()]
 709             args("-Dcross.platform=$conf")
 710             if (targetProperties.containsKey('arch')) {
 711                 args("-Dcross.platform.arch=${targetProperties.arch}")
 712             }
 713         }
 714         if (params != null) {
 715             params.each() { s->
 716                 args(s)
 717             }
 718         }
 719         args(target);
 720     }
 721 }
 722 
 723 List<String> computeLibraryPath(boolean working) {
 724     List<String> lp = []
 725     List<String> modsWithNative = [ 'graphics', 'media', 'web' ]
 726 
 727     // the build/modular-sdk area
 728     def platformPrefix = ""


 970 compileTargets { t ->
 971     def targetProperties = project.rootProject.ext[t.upper]
 972 
 973     if (targetProperties.compileSwing) COMPILE_SWING = true
 974     if (targetProperties.compileSWT) COMPILE_SWT = true
 975     if (IS_BUILD_FXPACKAGER && targetProperties.compileFXPackager) COMPILE_FXPACKAGER = true
 976 
 977     if (!targetProperties.containsKey('compileWebnodeNative')) {
 978         // unless specified otherwise, we will compile native Webnode if IS_COMPILE_WEBKIT
 979         targetProperties.compileWebnodeNative = true
 980     }
 981 
 982     if (!targetProperties.containsKey('compileMediaNative')) {
 983         // unless specified otherwise, we will compile native Media if IS_COMPILE_MEDIA
 984         targetProperties.compileMediaNative = true
 985     }
 986 
 987     if (!targetProperties.containsKey('includeSWT')) targetProperties.includeSWT = true
 988     if (!targetProperties.containsKey('includeSwing')) targetProperties.includeSwing = true
 989     if (!targetProperties.containsKey('includeNull3d')) targetProperties.includeNull3d = true

 990     if (!targetProperties.containsKey('includeMonocle')) targetProperties.includeMonocle = false
 991     if (!targetProperties.containsKey('includeEGL')) targetProperties.includeEGL = false
 992 
 993     if (!targetProperties.containsKey('includeGTK')) targetProperties.includeGTK = IS_LINUX
 994 
 995     if (!targetProperties.containsKey('modLibDest')) targetProperties.modLibDest = targetProperties.libDest
 996 
 997     // This value is used as a prefix for various directories under ./build,
 998     // such as sdk, to allow for a common name for the hosted build
 999     // (for use when building apps) and a unique name for cross builds.
1000     if (rootProject.defaultHostTarget.equals(t.name)) {
1001         // use a simple common default for the "host" build
1002         targetProperties.platformPrefix=""
1003     } else {
1004         // and a more complex one for cross builds
1005         targetProperties.platformPrefix="${t.name}-"
1006     }
1007 }
1008 
1009 /******************************************************************************


2525                     environment(WINDOWS_NATIVE_COMPILE_ENVIRONMENT)
2526                 })
2527             }
2528         }
2529 
2530         task copyJavaPackager(type: Copy, group: "Build", dependsOn: linkJavaPackager) {
2531             from file("$buildDir/native/javapackager/javapackager.exe")
2532             into file("$buildDir/javapackager")
2533         }
2534 
2535         task buildJavaPackager(dependsOn: [copyJavaPackager])
2536     } else {
2537         task buildJavaPackager(type: Copy, group: "Build") {
2538             enabled = COMPILE_FXPACKAGER
2539             from "src/main/native/javapackager/shell"
2540             into "$buildDir/javapackager"
2541             fileMode = 0755
2542         }
2543     }
2544 
2545     if (COMPILE_FXPACKAGER) {
2546         assemble.dependsOn compileLauncher;
2547         assemble.dependsOn buildJavaPackager
2548     }
2549 
2550     classes << {
2551         // Copy all of the download libraries to libs directory for the sake of the IDEs
2552         File libsDir = rootProject.file("build/libs");
2553         File antLib = new File(libsDir, "ant-1.8.2.jar")
2554         libsDir.mkdirs();
2555 
2556         // Skip copy if file is present.
2557         if (antLib.exists()) return;
2558 
2559         for (File f : configurations.compile.files) {
2560             copy {
2561                 into libsDir
2562                 from f.getParentFile()
2563                 include "**/ant-1.8.2.jar"
2564                 includeEmptyDirs = false
2565             }
2566         }
2567     }
2568 


4032                     exclude ("**/*.hlsl",
4033                              "com/sun/glass/ui/win",
4034                              "com/sun/prism/d3d",
4035                              "com/sun/prism/es2/WinGL*",
4036                              "com/sun/scenario/effect/impl/hw/d3d"
4037                              )
4038                 }
4039 
4040                 if (!targetProperties.includeGTK) { //usually IS_LINUX
4041                     exclude (
4042                              "com/sun/glass/ui/gtk",
4043                              "com/sun/prism/es2/EGL*",
4044                              "com/sun/prism/es2/X11GL*"
4045                              )
4046                 }
4047 
4048                 if (!targetProperties.includeEGL) {
4049                     exclude ("com/sun/prism/es2/EGL*")
4050                 }
4051 




4052                 if (!targetProperties.includeMonocle) {
4053                     exclude ("com/sun/glass/ui/monocle")
4054                     exclude("com/sun/prism/es2/Monocle*")
4055                 }
4056 
4057                 if (t.name != 'ios') {
4058                     exclude ("com/sun/media/jfxmediaimpl/platform/ios",
4059                              "com/sun/glass/ui/ios",
4060                              "com/sun/prism/es2/IOS*"
4061                              )
4062                 }
4063 
4064                 if (t.name != 'android' && t.name != 'dalvik') {
4065                     exclude ("com/sun/glass/ui/android")
4066                 }
4067 
4068                 // Filter out other platform-specific classes
4069                 if (targetProperties.containsKey('jfxrtJarExcludes')) {
4070                     exclude(targetProperties.jfxrtJarExcludes)
4071                 }


4106 
4107         def packagerProject = project(":fxpackager");
4108         dependsOn(packagerProject.assemble)
4109         dependsOn(packagerProject.jar)
4110         dependsOn(project(":fxpackagerservices").jar)
4111 
4112         def library = targetProperties.library
4113 
4114         def useLipo = targetProperties.containsKey('useLipo') ? targetProperties.useLipo : false
4115         def modLibDest = targetProperties.modLibDest
4116         def moduleNativeDirName = "${platformPrefix}module-$modLibDest"
4117 
4118         def buildModuleBaseTask = task("buildModuleBase$t.capital", dependsOn: baseProject.assemble) {
4119             group = "Basic"
4120             description = "creates javafx.base property files"
4121 
4122             def moduleLibDir = "${baseProject.buildDir}/${platformPrefix}module-lib"
4123             final File javafxProperties = file("${moduleLibDir}/javafx.properties")
4124             outputs.file(javafxProperties)
4125 
4126             if (targetProperties.containsKey("javafxPlatformProperties")) {
4127                 final File javafxPlatformProperties = file("${moduleLibDir}/javafx.platform.properties")
4128                 outputs.file(javafxPlatformProperties)
4129             }
4130 
4131             doLast {
4132                 mkdir moduleLibDir
4133 
4134                 javafxProperties.delete()
4135                 javafxProperties << "javafx.version=$RELEASE_VERSION_SHORT";
4136                 javafxProperties << "\n"
4137                 javafxProperties << "javafx.runtime.version=$RELEASE_VERSION_LONG";
4138                 javafxProperties << "\n"
4139                 javafxProperties << "javafx.runtime.build=$PROMOTED_BUILD_NUMBER";
4140                 javafxProperties << "\n"
4141                 // Include any properties that have been defined (most likely in
4142                 // one of the various platform gradle files)
4143                 if (targetProperties.containsKey("javafxProperties")) {
4144                     javafxProperties << targetProperties.javafxProperties
4145                     javafxProperties << "\n"
4146                 }
4147 
4148                 // Embedded builds define this file as well
4149                 if (targetProperties.containsKey("javafxPlatformProperties")) {
4150                     final File javafxPlatformProperties = file("${moduleLibDir}/javafx.platform.properties")


4151                     javafxPlatformProperties.delete()
4152                     javafxPlatformProperties << targetProperties.javafxPlatformProperties
4153                     javafxPlatformProperties << "\n"
4154                 }
4155             }
4156         }
4157 
4158         def buildModuleGraphicsTask = task("buildModuleGraphics$t.capital", type: Copy, dependsOn: graphicsProject.assemble) {
4159             group = "Basic"
4160             description = "copies javafx.graphics native libraries"
4161 
4162             into "${graphicsProject.buildDir}/${moduleNativeDirName}"
4163 
4164             from("${graphicsProject.buildDir}/libs/jsl-decora/${t.name}/${library(targetProperties.decora.lib)}")
4165             def libs = ['font', 'prism', 'prismSW', 'glass', 'iio']
4166             if (IS_INCLUDE_ES2) {
4167                 libs += ['prismES2'];
4168             }
4169             if (IS_COMPILE_PANGO) {
4170                 libs += ['fontFreetype', 'fontPango'];


< prev index next >