-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
81 lines (70 loc) · 1.91 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
buildscript {
repositories {
jcenter()
}
}
plugins {
id "com.jfrog.bintray" version "1.8.0"
}
allprojects {
ext {
springVersion = "4.3.12.RELEASE"
kafkaVersion = "0.8.2.0"
scalaVersion = "2.11"
}
repositories {
jcenter()
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'java'
}
def deployArtifact = new Properties()
deployArtifact.load(new FileInputStream("deploy.settings"))
Properties bintrayProps = new Properties()
File propFile = "${System.properties['user.home']}${File.separator}.gradle${File.separator}bintray.properties" as File
bintrayProps.load(propFile.newDataInputStream())
project('zk_kafka') {
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven'
publishing {
publications {
bintray(MavenPublication) {
from components.java
groupId deployArtifact.groupId
artifactId deployArtifact.id
version deployArtifact.version
artifact sourcesJar
artifact javadocJar
}
}
}
bintray {
user = bintrayProps.get("bintray.user")
key = bintrayProps.get("bintray.apikey")
publications = ['bintray']
pkg {
repo = 'Personal'
name = deployArtifact.name
userOrg = user
licenses = ['Apache-2.0']
vcsUrl = deployArtifact.gitUrl
publicDownloadNumbers = true
version {
name = deployArtifact.deployVersion
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
}