-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
119 lines (107 loc) · 2.83 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
plugins {
id 'com.jfrog.bintray' version '1.8.4'
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'java-library-distribution'
ext {
productVersion = '1.2.3.0'
product = 'embedded-consul'
javaTarget = JavaVersion.VERSION_1_8
libraries = [
flapdoodleProcess: 'de.flapdoodle.embed:de.flapdoodle.embed.process:2.0.5',
junit: 'junit:junit:4.12'
]
}
idea {
project {
jdkName = javaTarget
languageLevel = javaTarget
vcs = 'Git'
}
module {
name = product
}
}
version = productVersion
sourceCompatibility = javaTarget
targetCompatibility = javaTarget
repositories {
mavenCentral()
}
dependencies {
compile(libraries.flapdoodleProcess)
testCompile(libraries.junit)
}
task sourcesJar(type: Jar, dependsOn: compileJava) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
def pomConfig = {
licenses {
license {
name 'BSD 3-Clause'
url 'http://www.opensource.org/licenses/bsd-license.php'
distribution 'repo'
}
}
developers {
developer {
id 'golovnin'
name 'Andrej Golovnin'
email 'andrej.golovnin@gmail.com'
}
}
scm {
url 'https://github.com/golovnin/embedded-consul'
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId 'com.github.golovnin'
artifactId product
version productVersion
from components.java
artifact sourcesJar {
classifier 'sources'
}
artifact javadocJar {
classifier 'javadoc'
}
pom.withXml {
def root = asNode()
root.appendNode('description', 'Embedded Consul based on https://github.com/flapdoodle-oss/de.flapdoodle.embed.process')
root.appendNode('name', 'Embedded Consul')
root.appendNode('url', 'https://github.com/golovnin/embedded-consul')
root.children().last() + pomConfig
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['mavenJava']
pkg {
repo = 'maven'
name = product
userOrg = System.getenv('BINTRAY_USER')
licenses = ['BSD 3-Clause']
vcsUrl = 'https://github.com/golovnin/embedded-consul'
labels = ['embedded', 'consul']
version {
name = productVersion
vcsTag = productVersion
released = new java.util.Date()
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
}