-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
144 lines (118 loc) · 4.56 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
plugins {
id "org.kordamp.gradle.stats" version "0.1.4"
id 'groovy'
id 'distribution'
id 'com.github.johnrengelman.shadow' version '1.2.2'
}
def projectName = 'CVM'
description = "$projectName - Configuration Versioning Manager"
group = 'com.allthingsmonitoring.utils.CVM'
archivesBaseName = 'cvm'
distsDirName = 'dist'
version = '1.2.0'
def authorString = 'Sebastian YEPES FERNANDEZ ([email protected])'
def copyrightString = 'Copyright © 2015 – Sebastian YEPES FERNANDEZ All Rights Reserved.'
defaultTasks 'clean','shadowJar','groovydoc','distZip'
configurations {
groovyDoc
}
// http://svn.codehaus.org/griffon/builders/jidebuilder/trunk/build.gradle
// http://gparallelizer.googlecode.com/svn/trunk/build.gradle
configure([compileGroovy, compileTestGroovy]) {
//groovyOptions.useAnt = true
//compileGroovy.groovyOptions.fork = true
groovyOptions.fork(memoryInitialSize: '128M', memoryMaximumSize: '1G')
groovyOptions.encoding = 'UTF-8'
//groovyOptions.optimizationOptions.indy = true
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
//configurations.compile.transitive = false
compileJava {
options.encoding = 'UTF-8'
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
repositories {
mavenLocal()
maven { url 'http://oss.sonatype.org/content/groups/public/' }
mavenCentral()
}
// 1.0.11 (GSiftingAppender.groovy) https://github.com/qos-ch/logback/commit/a86350e20ebf79b70aa737ea6149bf8485f2d295#logback-classic/src/main/groovy/ch/qos/logback
dependencies {
compile 'org.codehaus.groovy:groovy:2.+',
'org.codehaus.groovy:groovy-jmx:2.+',
'org.codehaus.groovy:groovy-json:2.+',
'org.codehaus.groovy:groovy-xml:2.+',
'org.codehaus.groovy:groovy-nio:2.+',
'org.codehaus.groovy:groovy-ant:2.+',
'commons-cli:commons-cli:1.+',
'org.slf4j:slf4j-api:1.7.+',
'ch.qos.logback:logback-core:1.0.11',
'ch.qos.logback:logback-classic:1.0.11',
'com.jcraft:jsch:0.1.+',
'com.jcraft:jzlib:1.+',
'org.eclipse.jgit:org.eclipse.jgit:3.+',
'net.sf.expectit:expectit-core:0.+',
'com.github.fge:json-schema-validator:2.+',
fileTree(dir: 'libs', include: '*.jar')
compile 'com.github.groovy-wslite:groovy-wslite:1.+', {
exclude module: "groovy-all"
}
compile 'org.codehaus.jsr166-mirror:jsr166y:1.7.+'
compile 'org.codehaus.gpars:gpars:1.+', {
exclude module: 'groovy-all'
}
groovyDoc 'org.codehaus.groovy:groovy-groovydoc:2.+',
'org.codehaus.groovy:groovy-ant:2.+'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4', {
exclude module: 'groovy-all'
}
}
groovydoc {
groovyClasspath = configurations.groovyDoc
destinationDir = new File(( System.getProperty( 'groovydocDir' ) ?: project.buildDir.path + '/docs' ), ( project.version.contains( '-SNAPSHOT' ) ? '' : project.version ))
includePrivate = true
windowTitle = "$projectName"
docTitle = "$projectName - v$project.version"
header = ""
footer = copyrightString
overview ""
link 'http://download.oracle.com/javase/6/docs/api/', 'java.'
link 'http://www.groovy-lang.org/api/', 'groovy.', 'org.codehaus.groovy.'
link 'http://commons.apache.org/net/apidocs/', 'org.apache.commons.net.'
}
shadowJar {
zip64 true
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA'
exclude 'META-INF/*.txt', 'META-INF/*.properties', '*.htm*', '*.properties'
exclude 'META-INF/INDEX.LIST', 'META-INF/DEPENDENCIES*', 'META-INF/LICENSE*', 'META-INF/README*','META-INF/NOTICE*'
mergeServiceFiles()
mergeGroovyExtensionModules()
manifest {
attributes 'Implementation-Title': project.description,
'Implementation-Version': project.version,
'Specification-Title': project.description,
'Specification-Version': project.version,
'Built-By': System.properties['user.name'],
'Built-JDK': System.properties['java.version'] +' ('+ System.properties['java.vm.vendor'] +')',
'Built-Date': new Date(),
'Author': authorString,
'Main-Class': project.group
}
}
distributions {
main {
baseName = archivesBaseName
contents {
from { 'build/libs' }
from { 'src/dist' }
from { 'README.md' }
from { 'CHANGELOG.md' }
from { 'LICENSE.md' }
}
}
}
distZip.dependsOn('shadowJar')
distTar.dependsOn('shadowJar')
distTar.compression = Compression.GZIP