This repository has been archived by the owner on Sep 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
74 lines (67 loc) · 1.79 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
}
}
/** */
//apply plugin: 'java'
//apply plugin: 'groovy'
/** Project managment, IDEs, and deploy */
//apply plugin: 'eclipse'
apply plugin: 'maven'
/** Code quality and reporting */
//apply plugin: 'code-quality'
//apply plugin: 'project-report'
version = '0.0.1-SNAPSHOT'
archivesBaseName = 'tcserver-tools'
artifact="${name}-${version}"
buildArtifact="build/${artifact}"
//sourceCompatibility = '1.6'
//targetCompatibility = '1.5'
task clean(type:Delete){
//making sure we have the right privs.
if ( file(buildArtifact).exists() ){
ant.chmod( dir:buildArtifact, perm:"644", excludes:"**/*.sh")
ant.chmod( dir:buildArtifact, perm:"755", includes:"**/*.sh")
}
delete 'build'
delete 'dist'
}
/** */
task docs {
description = 'Builds the documentation'
}
task distCopy() {
file(buildArtifact).mkdirs()
ant.copy(todir: "$buildArtifact/bin" ){
ant.fileset( dir: "src/main/bin" )
}
ant.copy(todir: "$buildArtifact/templates"){
ant.fileset( dir: "src/main/templates")
}
ant.copy(todir: "$buildArtifact/samples"){
ant.fileset( dir:"src/main/samples" ){
exclude( name:"**/*.log" )
exclude( name:"**/*.out" )
}
}
ant.fixcrlf( srcdir:buildArtifact, includes:"**/*.sh", eol:"lf", eof:"remove")
ant.chmod( dir:buildArtifact, perm:"644", excludes:"**/*.sh")
ant.chmod( dir:"$buildArtifact/bin", perm:"755", includes:"**/*.sh")
}
/** */
task dists {
dependsOn distCopy
dependsOn docs
ant.tar(destfile: "dist/${artifact}.tar" ) {
ant.tarfileset(dir: "build/${artifact}", prefix:"${artifact}")
}
ant.gzip(destfile: "dist/${artifact}.tar.gz", src:"dist/${artifact}.tar")
}
/** */
dists {
description = 'Builds the distribution'
group = 'build'
}