-
-
Notifications
You must be signed in to change notification settings - Fork 103
/
build.gradle
127 lines (107 loc) · 2.97 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
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 '2.0.2'
description 'A library and utility to compare different images.'
sourceCompatibility = 1.8
mainClassName = "ua.comparison.image.ImageComparison"
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.26.0'
}
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 '2019'
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 Unlicense'
url 'http://unlicense.org/'
}
}
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 = 'maven'
name = 'image-comparison'
licenses = ['unlicense']
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