-
-
Notifications
You must be signed in to change notification settings - Fork 105
/
build.gradle
133 lines (112 loc) · 3.33 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
plugins {
id 'jacoco'
id 'java'
id 'application'
id 'com.github.kt3k.coveralls' version '2.6.3'
id 'maven'
id "com.jfrog.bintray" version "1.8.4"
}
group 'com.github.romankh3'
version '4.4.0'
description 'Library that compares 2 images with the same sizes and shows the differences visually by drawing rectangles. ' +
'Some parts of the image can be excluded from the comparison. Can be used for automation qa tests.'
sourceCompatibility = 1.8
mainClassName = "com.github.romankh3.image.comparison.ImageComparison"
repositories {
mavenCentral()
}
dependencies {
testCompile 'org.junit.jupiter:junit-jupiter-api:5.5.2'
testCompile 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
testCompile 'org.mockito:mockito-core:2.26.0'
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes 'Main-Class': mainClassName,
"Implementation-Title": "image-comparison",
"Implementation-Version": version,
"Automatic-Module-Name": 'com.github.romankh3.image.comparison'
}
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
defaultTasks << 'clean'
defaultTasks << 'build'
/* Publishing config */
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
// add all the info required by Maven Central to the pom
configure(install.repositories.mavenInstaller) {
pom.project {
inceptionYear '2020'
name project.name
packaging 'jar'
description project.description
url 'https://romankh3.github.io/image-comparison/'
scm {
connection 'git@github.com:romankh3/image-comparison.git'
developerConnection 'git@github.com:romankh3/image-comparison.git'
url 'https://github.com/romankh3/image-comparison'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'romankh3'
name 'Roman Beskrovnyi'
email 'roman.beskrovnyy@gmail.com'
}
}
}
}
def getProjectProperty = { String propertyName ->
project.properties[propertyName]
}
bintray {
user = getProjectProperty "bintrayUserName"
key = getProjectProperty "bintrayApiKey"
configurations = ['archives']
publish = true
pkg {
repo = 'image-comparison'
name = 'image-comparison'
licenses = ['Apache-2.0']
labels = ['java', 'image', 'image-comparison']
publicDownloadNumbers = true
//noinspection GroovyAssignabilityCheck
version {
name = project.version
vcsTag = project.version
gpg {
sign = true
}
mavenCentralSync {
sync = true
user = getProjectProperty 'ossrhUsername'
password = getProjectProperty 'ossrhPassword'
close = '1' // '0' to NOT close
}
}
}
}
bintrayUpload.dependsOn build, sourcesJar