Home | History | Annotate | Download | only in monitor
      1 apply plugin: 'sdk-files'
      2 
      3 // See $ANDROID_SRC/tools/buildSrc/base/version.gradle for definition of baseVersion
      4 // However, if Eclipse bundles don't get the same version as tools baseVersion, then this
      5 // will have to be hard coded and fixed by sdk/eclipse/scripts/update_version.sh
      6 def basePath = "../../out/host/maven/bundles-${rootProject.ext.baseVersion}-SNAPSHOT/products/"
      7 
      8 sdk {
      9     linux {
     10         item('monitor') {
     11             notice null
     12             executable true
     13         }
     14         item(basePath + 'lin64/monitor') {
     15             into 'lib/monitor-x86_64'
     16             notice null
     17             builtBy 'unzipLinux64'
     18         }
     19         item(basePath + 'lin/monitor') {
     20             into 'lib/monitor-x86'
     21             notice null
     22             builtBy 'unzipLinux'
     23         }
     24     }
     25 
     26     mac {
     27         item('monitor') {
     28             notice null
     29             executable true
     30         }
     31         item(basePath + 'mac64/monitor') {
     32             into 'lib/monitor-x86_64'
     33             notice null
     34             builtBy 'unzipMac64'
     35         }
     36     }
     37 
     38 
     39     windows {
     40         item('monitor.bat') {
     41             notice null
     42             executable true
     43         }
     44         item(basePath + 'win64/monitor') {
     45             into 'lib/monitor-x86_64'
     46             notice null
     47             builtBy 'unzipWin64'
     48         }
     49         item(basePath + 'win/monitor') {
     50             into 'lib/monitor-x86'
     51             notice null
     52             builtBy 'unzipWin'
     53         }
     54     }
     55 }
     56 
     57 // Using PDE build, the size of monitor was 43M
     58 // With Tycho, we are at close to 75M. Until we figure out the proper way
     59 // to exclude unnecessary content, we just remove these plugins from the final build.
     60 def pluginsToRemove = [
     61     'org.eclipse.platform.doc.user_4.2.2.v20130121-200410.jar',
     62     'org.eclipse.debug.ui_3.8.2.v20130130-171415.ja',
     63     'org.apache.jasper.glassfish_2.2.2.v201205150955.jar',
     64     'org.eclipse.team.ui_3.6.201.v20130125-135424.jar',
     65     'org.apache.lucene.core_2.9.1.v201101211721.jar',
     66     'org.eclipse.help.webapp_3.6.101.v20130116-182509.jar',
     67     'org.eclipse.help.ui_3.5.201.v20130108-092756.jar',
     68     'org.eclipse.help.base_3.6.101.v201302041200.jar',
     69     'org.eclipse.team.core_3.6.100.v20120524-0627.jar',
     70     'org.eclipse.jetty.server_8.1.3.v20120522.jar',
     71     'org.eclipse.ui.intro_3.4.200.v20120521-2344.jar',
     72     'org.eclipse.ui.cheatsheets_3.4.200.v20120521-2344.jar',
     73     'org.apache.ant_1.8.3.v201301120609/**'
     74 ]
     75 
     76 task unzipLinux64(type: Copy) {
     77     from zipTree(file(basePath + 'monitorproduct-linux.gtk.x86_64.zip'))
     78     into file(basePath + 'lin64/')
     79     pluginsToRemove.each {
     80         exclude "**/$it"
     81     }
     82 }
     83 
     84 task unzipLinux(type: Copy) {
     85     from zipTree(file(basePath + 'monitorproduct-linux.gtk.x86.zip'))
     86     into file(basePath + 'lin/')
     87     pluginsToRemove.each {
     88         exclude "**/$it"
     89     }
     90 }
     91 
     92 task unzipMac64(type: Copy) {
     93     from zipTree(file(basePath + 'monitorproduct-macosx.cocoa.x86_64.zip'))
     94     into file(basePath + 'mac64/')
     95     pluginsToRemove.each {
     96         exclude "**/$it"
     97     }
     98 }
     99 
    100 task unzipWin64(type: Copy) {
    101     from zipTree(file(basePath + 'monitorproduct-win32.win32.x86_64.zip'))
    102     into file(basePath + 'win64/')
    103     pluginsToRemove.each {
    104         exclude "**/$it"
    105     }
    106 }
    107 
    108 task unzipWin(type: Copy) {
    109     from zipTree(file(basePath + 'monitorproduct-win32.win32.x86.zip'))
    110     into file(basePath + 'win/')
    111     pluginsToRemove.each {
    112         exclude "**/$it"
    113     }
    114 }
    115