-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
85 lines (66 loc) · 2.34 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
group 'org.cups4j'
version latestRepoTag()
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'idea'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
ext {
// the username and password need to be specified via the command line
nexusUser = project.hasProperty('nexusUser') ? project.getProperty('nexusUser') : '';
nexusPassword = project.hasProperty('nexusPassword') ? project.getProperty('nexusPassword') : '';
}
repositories {
maven {
url "http://nexus.adigitalsys.com/repository/maven-public"
}
}
dependencies {
compile group: 'commons-codec', name: 'commons-codec', version: '1.10'
compile group: 'commons-logging', name: 'commons-logging', version: '1.2'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
compile group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: '4.5.3'
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.7'
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.3'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
repositories {
maven {
credentials {
username "${project.nexusUser}"
password "${project.nexusPassword}"
}
url "http://nexus.adigitalsys.com/repository/maven-releases"
}
}
publications {
mavenJava(MavenPublication) {
version latestRepoTag()
pom.withXml {
asNode().appendNode('description',
'Cups4J is a Java library project that aims to give Java developers an easy interface to communicate with CUPS to query printers, print documents, monitor print jobs and much more.')
}
artifact sourcesJar
artifact javadocJar
from components.java
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.1'
}
static def latestRepoTag() {
def cmd = "git describe --abbrev=0"
def proc = cmd.execute()
return proc.text.trim()
}