forked from ari4java/ari4java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
123 lines (109 loc) · 2.74 KB
/
build.gradle
File metadata and controls
123 lines (109 loc) · 2.74 KB
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
plugins {
id 'java'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.4'
}
group = 'ch.loway.oss.ari4java'
version = '0.6.1'
sourceSets {
main {
java {
srcDir 'src/main/generated'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.fasterxml.jackson.core:jackson-core:2.9.6'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.6'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.6'
compile 'io.netty:netty-all:4.0.25.Final'
compile 'javax.xml.bind:jaxb-api:2.1'
testCompile 'junit:junit:4.10'
}
compileJava.dependsOn ':codegen:runCodegen'
compileJava.dependsOn 'buildProps'
def build_number = 'x'
if (System.getenv('BUILD_NUMBER') != null) {
build_number = System.getenv('BUILD_NUMBER')
}
task buildProps(type: WriteProperties) {
outputFile file('src/main/resources/build.properties')
property 'BUILD_NUMBER', build_number
}
jar {
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
javadoc.failOnError = false
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
def projectUrl = 'http://github.com/l3nz/ari4java'
def pomConfig = {
licenses {
license {
name 'LPGL-3.0'
}
}
developers {
developer {
name 'lenz e.'
email 'nomail@home'
}
}
scm {
url projectUrl
}
}
publishing {
publications {
mavenPublication(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
pom.withXml {
def root = asNode()
root.appendNode('description', 'Asterisk ARI interface bindings for Java')
root.appendNode('name', project.name)
root.appendNode('url', projectUrl)
root.children().last() + pomConfig
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['mavenPublication']
publish = true
pkg {
repo = 'maven'
name = project.name
userOrg = 'ari4java'
licenses = ['LGPL-3.0']
vcsUrl = projectUrl
version {
name = project.version
desc = project.version
released = new Date()
}
}
}