/
build.gradle
117 lines (94 loc) · 2.54 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
plugins {
id "com.github.hierynomus.license" version "0.13.1"
}
group 'net.nodestyle'
version '0.0.1'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: "com.github.hierynomus.license"
sourceCompatibility = 1.7
targetCompatibility = 1.7
def sources = [
"net/nodestyle/events/**",
"net/nodestyle/helper/**",
"net/nodestyle/path/**",
]
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
//compile
}
jar {
include sources
manifest {
attributes 'License': 'GPL-3.0'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sources
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
maven(MavenPublication) {
groupId 'net.nodestyle'
artifactId 'nodestyle'
version '0.0.1'
artifact sourcesJar
}
}
}
license {
header new File('./HEADER' )
strictCheck false
ignoreFailures true
mapping {
javascript='JAVADOC_STYLE'
}
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.name = 'Maciej Krüger'
ext.email = 'mkg20001@gmail.com'
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'NodeStyle - NodeJS like APIs for Java',
'Implementation-Version': version
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
test {
dependsOn 'cleanTest'
// set a system property for the test JVM(s)
//systemProperty 'some.prop', 'value'
// explicitly include or exclude tests
include 'net/nodestyle/test/**'
include 'net/nodestyle/**'
//exclude 'org/boo/**'
// show standard out and standard error of the test JVM(s) on the console
testLogging.showStandardStreams = true
// set heap size for the test JVM(s)
minHeapSize = "128m"
maxHeapSize = "512m"
// set JVM arguments for the test JVM(s)
jvmArgs '-XX:MaxPermSize=256m'
// listen to events in the test execution lifecycle
beforeTest { descriptor ->
logger.lifecycle("Running test: " + descriptor)
}
// listen to standard out and standard error of the test JVM(s)
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
}
}