-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
101 lines (90 loc) · 2.63 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
plugins {
id 'java'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.4'
}
group = 'com.snowplowanalytics'
archivesBaseName = 'java-referer-parser'
version = '0.4.0'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
compile 'org.yaml:snakeyaml:1.19'
compile 'org.apache.httpcomponents:httpclient:4.5.3'
testCompile 'junit:junit:4.12'
testCompile 'org.json:json:20180813'
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
pkg {
repo = 'snowplow-maven'
name = archivesBaseName
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/snowplow-referer-parser/java-referer-parser.git'
}
publications = ['mavenJava']
version {
name = version
gpg {
sign = true
}
mavenCentralSync {
sync = true
user = System.getenv('SONA_USER')
password = System.getenv('SONA_PASS')
}
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id 'alexanderdean'
name 'Alexander Dean'
email '[email protected]'
}
}
scm {
connection 'https://github.com/snowplow-referer-parser/java-referer-parser.git'
developerConnection 'https://github.com/snowplow-referer-parser/java-referer-parser.git'
url 'https://github.com/snowplow-referer-parser/java-referer-parser'
}
}
// Create the publication with the pom configuration:
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId group
artifactId 'java-referer-parser'
version version
pom.withXml {
def root = asNode()
root.appendNode('description', 'This is the Java implementation of referer-parser, the library for extracting attribution data from referer (sic) URLs.')
root.appendNode('name', 'Java Referer Parser')
root.appendNode('url', 'https://github.com/snowplow-referer-parser/java-referer-parser')
root.children().last() + pomConfig
}
}
}
}