forked from michaelknigge/pcldumper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
152 lines (126 loc) · 4.37 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
144
145
146
147
148
149
150
151
152
defaultTasks 'clean', 'javadoc', 'test', 'check', 'checkstyleMain', 'checkstyleTest', 'assemble', 'shadowJar'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'net.researchgate:gradle-release:2.4.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
apply plugin: 'findbugs'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'net.researchgate.release'
apply plugin: 'com.github.johnrengelman.shadow'
version = "1.4"
check.dependsOn jacocoTestReport
bintrayUpload.dependsOn 'jar', 'sourceJar', 'javadocJar'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}
javadoc {
options.encoding = 'UTF-8'
}
repositories {
jcenter()
}
dependencies {
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
compile group: 'de.textmode.pclbox', name: 'pclbox', version: '2.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'commons-io', name: 'commons-io', version: '2.5'
}
configurations {
checkstyleConfig
}
dependencies {
checkstyleConfig ("com.puppycrawl.tools:checkstyle:7.1") {
transitive = false
}
}
checkstyle {
toolVersion = '7.1'
configFile = new File(rootDir, "config/checkstyle.xml")
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
release {
failOnUnversionedFiles = false
}
jar {
manifest {
attributes("Implementation-Title": "pcldumper",
"Implementation-Version": version,
"Implementation-Vendor": "https://github.com/michaelknigge/pcldumper",
"Specification-Title": "Java command line tool for dumping PCL printer data streams",
"Main-Class": "de.textmode.pcldumper.Main",
"Created-By": System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')',
"Class-Path": configurations.compile.collect { it.getName() }.join(' '))
}
}
bintray {
user = project.hasProperty('bintray.user') ? project.property('bintray.user') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintray.key') ? project.property('bintray.key') : System.getenv('BINTRAY_KEY')
publications = ['maven']
publish = true
pkg {
repo = 'maven'
name = 'pcldumper'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/michaelknigge/pcldumper.git'
websiteUrl = 'https://github.com/michaelknigge/pcldumper'
issueTrackerUrl = 'https://github.com/michaelknigge/pcldumper/issues'
labels = ['pcl', 'pjl', 'hpgl', 'dump', 'analysis', 'analyzer']
publicDownloadNumbers = true
githubRepo = 'michaelknigge/pcldumper'
version {
name = project.version
desc = "pcldumper version ${project.version}"
released = new Date()
vcsTag = "${project.version}"
gpg {
sign = true
}
}
}
}
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
}
task javadocJar (type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourceJar {
classifier 'sources'
}
artifact (javadocJar) {
classifier = 'javadoc'
}
groupId 'de.textmode.pcldumper'
artifactId 'pcldumper'
version "${project.version}"
}
}
}
}