-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
132 lines (117 loc) · 3.21 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
plugins {
id 'java-library'
id 'com.jfrog.bintray' version '1.8.4'
id 'maven-publish'
}
version '4.1.0'
group 'com.comfortanalytics'
description 'Async Java Util Logging'
def projectUrl = 'https://github.com/a-hansen/alog'
def vcsUrl = 'https://github.com/a-hansen/alog.git'
def scmUrl = 'scm:https://github.com/a-hansen/alog.git'
def issuesUrl = 'https://github.com/a-hansen/alog/issues'
def githubRepo = 'a-hansen/alog'
def developerId = 'a-hansen'
def developerName = 'Aaron Hansen'
def developerOrg = 'Comfort Analytics'
def developerOrgUrl = 'http://comfortanalytics.com'
sourceCompatibility = JavaVersion.VERSION_1_5
targetCompatibility = JavaVersion.VERSION_1_5
repositories {
jcenter()
}
dependencies {
testImplementation 'org.testng:testng:6.14.3'
}
test {
useTestNG()
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
wrapper {
gradleVersion = '5.4'
}
// Jcenter
// -------
bintray {
user = project.properties.bintrayUser
key = project.properties.bintrayApiKey
publications = ['MyPublication']
dryRun = false
publish = true
override = true
pkg {
repo = project.group
name = project.name
licenses = ['ISC']
desc = project.description
vcsUrl = vcsUrl
websiteUrl = projectUrl
issueTrackerUrl = issuesUrl
githubRepo = githubRepo
githubReleaseNotesFile = 'README.md'
version {
name = project.version
desc = project.description
released = new Date()
vcsTag = project.version
mavenCentralSync {
sync = false //[Default: true] Determines whether to sync the version to Maven Central.
user = project.properties.ossrhUser
password = project.properties.ossrhPass
}
}
}
publications = ['MyPublication']
}
// Create the pom configuration:
def pomConfig = {
licenses {
license {
name 'ISC License'
url 'http://opensource.org/licenses/ISC'
distribution 'repo'
}
}
developers {
developer {
id developerId
name developerName
email project.properties.developerEmail
organization developerOrg
organizationUrl developerOrgUrl
}
}
scm {
url scmUrl
}
}
// Create the publication with the pom configuration:
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId project.name
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', project.description)
root.appendNode('name', project.name)
root.appendNode('url', projectUrl)
root.children().last() + pomConfig
}
}
}
}