forked from freeplane/freeplane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dist.gradle
62 lines (54 loc) · 1.34 KB
/
dist.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ext.globalDist = rootDir.path + '/DIST'
task gitinfoDist(type: Copy) {
from(globalBin) {
include('gitinfo.txt')
}
from(globalBin + '/resources') {
include('gitinfo.properties')
}
into(globalDist)
for (p in subprojects) {
dependsOn p.tasks.getByPath("build")
}
}
task historyDist(type:Copy) {
from(rootDir.path + '/freeplane/doc/'){
include 'history_en.txt'
}
into(globalDist)
}
apply from: './bin.dist.gradle'
apply from: './win.dist.gradle'
apply from: './mac.dist.gradle'
apply from: './src.dist.gradle'
apply from: './linux-packages.gradle'
// meta task
task dist {
dependsOn binZip
dependsOn srcTarGz
dependsOn srcpureTarGz
dependsOn windowsInstaller
dependsOn windowsPortableInstaller
dependsOn gitinfoDist
dependsOn historyDist
dependsOn freeplaneDeb
}
// clean
task cleanDist(type: Delete) {
delete globalDist
}
clean.dependsOn cleanDist
task createGitTag(type: Exec) {
def tag = "${versionStatus.empty ? 'release':versionStatus}-$majorVersion${minorVersion.empty ? '':'-pre'+minorVersion}"
ignoreExitValue = true
doFirst {
println "> Press enter to create tag $tag"
System.in.newReader().readLine()
}
commandLine 'git', 'tag', tag
}
task release {
dependsOn (clean, dist, createGitTag)
}
dist.mustRunAfter clean
createGitTag.mustRunAfter dist