forked from Solaris-Skunk-Werks/solarisskunkwerks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
57 lines (48 loc) · 1.32 KB
/
build.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
plugins {
id 'java'
id 'com.palantir.git-version' version '0.12.3'
}
allprojects {
version '0.7.6.1'
ext {
release='Stable'
rev=versionDetails().gitHash
}
jar {
onlyIf { !sourceSets.main.allSource.files.isEmpty() }
}
}
subprojects {
group 'com.solarisskunkwerks'
repositories {
mavenCentral()
}
}
evaluationDependsOnChildren()
task copyDocs(dependsOn: subprojects.build, type: Copy) {
from 'Docs'
into "${buildDir}/release/SSW_${version}/Docs"
}
task copyData(dependsOn: subprojects.build, type: Copy) {
from 'Data'
into "${buildDir}/release/SSW_${version}/Data"
}
task copyDeps(dependsOn: subprojects.build, type: Copy) {
from subprojects.collect { it.configurations.runtime }
into "$buildDir/release/SSW_${version}/lib"
}
task copyJars(dependsOn: subprojects.build, type: Copy) {
from subprojects.collect { it.tasks.withType(Jar) }
exclude "**/sswlib.jar"
into "$buildDir/release/SSW_${version}"
}
task releaseBuild(dependsOn: [copyDocs, copyData, copyDeps, copyJars]) { }
task zipRelease(type: Zip, dependsOn: releaseBuild) {
from "${buildDir}/release"
include "**/"
if ("$release" != "Stable") {
archiveName "SSW_${version}-${release}-${rev}.zip"
} else {
archiveName "SSW_${version}.zip"
}
}