forked from java-testkit/pdf-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
100 lines (82 loc) · 2.26 KB
/
Copy pathbuild.gradle
File metadata and controls
100 lines (82 loc) · 2.26 KB
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
buildscript {
repositories {
jcenter()
maven { url 'https://plugins.gradle.org/m2' }
}
dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.3'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
group='com.codeborne'
archivesBaseName = 'pdf-test'
version='1.6.1'
[compileJava, compileTestJava]*.options.collect {options -> options.encoding = 'UTF-8'}
[compileJava, compileTestJava]*.options.collect {options -> options.debug = true}
compileJava.options.debugOptions.debugLevel = "source,lines,vars"
sourceCompatibility = 1.8
targetCompatibility = 1.8
defaultTasks 'test', 'install'
dependencies {
implementation group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.22', transitive: true
implementation group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3', transitive: false
testImplementation group: 'junit', name: 'junit', version: '4.13.2', transitive: false
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3', transitive: false
implementation group: 'org.assertj', name: 'assertj-core', version: '3.19.0', transitive: false
}
repositories{
mavenCentral()
}
task libsProd(type: Sync) {
from configurations.compileClasspath
into "$buildDir/lib-prod"
}
task libsTest(type: Sync) {
from configurations.testRuntimeClasspath - configurations.compileClasspath
into "$buildDir/lib-test"
}
compileJava.dependsOn libsProd, libsTest
test {
include 'com/codeborne/pdftest/**/*'
systemProperties['file.encoding'] = 'UTF-8'
testLogging.showStandardStreams = true
jacoco {
enabled = true
}
}
jar {
manifest {
attributes(
"Implementation-Title": project.group + '.' + project.name,
"Implementation-Version": version,
"Implementation-Vendor": "Codeborne")
}
}
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
failOnError=false
}
task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
tasks.coveralls {
onlyIf { System.env.'CI' }
}