task binZip(type: Zip) {
    destinationDir = new File(globalDist)
    archiveName = 'freeplane_bin-' + distVersion + '.zip'

    from(globalBin) {
        include('**')
        exclude('freeplane.sh')
    }

    from(globalBin) {
        include('freeplane.sh')
        fileMode = 0755
    }

    from(rootDir) {
        include('license.txt')
    }

    into('freeplane-' + distVersion)

    for (p in subprojects) {
        dependsOn p.tasks.getByPath("build")
    }
}
