-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
77 lines (58 loc) · 1.55 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: "base"
apply plugin: "maven"
//defaultTasks : 'usage'
group = "org.homermultitext"
version = "2.0.rc.1"
if (hasProperty('pub')) {
System.err.print "Using configuration data from ${pub}"
File confFile = new File(pub)
if (! confFile.exists()) {
throw new Exception("No publication configuration file ${pub} found.")
} else {
apply from: pub
}
} else {
File confFile = new File("publish.gradle")
if (! confFile.exists()) {
throw new Exception("No publication configuration file ${confFile} found\
.")
} else {
println "Using default configuration in 'publish.gradle'"
apply from: "publish.gradle"
}
}
task setUp1 (type: Copy) {
from "reply_schemas"
into "${buildDir}/pkg/schemas"
include "**/*.rng"
doLast {
println "Copied schemas to build area."
}
}
task setUp2 (type: Copy) {
from "md"
into "${buildDir}/pkg"
include "specification.md"
filter(ReplaceTokens, tokens: [version : version])
doLast {
println "Copied specification to build area."
}
}
task release(type: Zip, dependsOn: [setUp1, setUp2]) {
description = 'Builds zip file of specification and schemas.'
from(file("${buildDir}/pkg"))
doLast {
println "Made zip file for release."
}
}
artifacts {
archives release
}
uploadArchives {
repositories.mavenDeployer {
repository(url: nexusRepo) {
authentication (userName: nexusUser, password: nexusPassword)
}
}
}