-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle
129 lines (107 loc) · 3.24 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7.1'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.9.0'
classpath 'com.netflix.nebula:gradle-ospackage-plugin:2.2.6'
}
}
subprojects {
group 'com.pakulov.kafka'
version '0.10.2'
ext {
kafkaVersion = "0.10.2.1"
}
repositories {
mavenCentral()
}
apply plugin: 'license'
apply plugin: 'maven-publish'
apply plugin: 'nexus'
apply plugin: 'java'
sourceCompatibility = 1.7
targetCompatibility = 1.7
modifyPom {
project {
name 'Kafka Graphite Metrics Reporter'
description 'Graphite integration for Kafka Metrics Reporter'
url 'https://github.com/apakulov/kafka-graphite'
inceptionYear '2015'
scm {
url 'https://github.com/apakulov/kafka-graphite'
connection 'scm:git:[email protected]:apakulov/kafka-graphite.git'
developerConnection 'scm:git:[email protected]:apakulov/kafka-graphite.git'
}
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 'apakulov'
name 'Alexander Pakulov'
email '[email protected]'
}
}
}
}
publishing {
publications {
maven(MavenPublication) {
artifact jar
}
}
}
license {
header rootProject.file('LICENSE')
}
}
project(':kafka-graphite') {
apply plugin: 'os-package'
apply plugin: 'scala'
ext {
ext.baseScalaVersion = '2.11'
if (project.hasProperty('scalaVersion')) {
String scalaVersion = project.property('scalaVersion');
ext.baseScalaVersion = scalaVersion.substring(0, scalaVersion.lastIndexOf('.'))
}
}
dependencies {
compile "org.apache.kafka:kafka_$baseScalaVersion:$kafkaVersion"
compile "com.yammer.metrics:metrics-graphite:2.2.0"
testCompile "org.scalatest:scalatest_$baseScalaVersion:3.0.3"
}
project.afterEvaluate {
project.tasks.each {
task -> if (task.name.toLowerCase().endsWith('jar'))
task.baseName = "kafka_${baseScalaVersion}-graphite"
}
}
ospackage {
release = '1'
os = 'LINUX'
into '/opt/kafka'
from(jar.outputs.files) {
into 'libs'
}
from(configurations.compile) {
include 'metrics-graphite*'
into 'libs'
}
}
}
project(':kafka-graphite-clients') {
dependencies {
compile "org.apache.kafka:kafka-clients:$kafkaVersion"
testCompile "org.hamcrest:hamcrest-junit:2.0.0.0",
'org.powermock:powermock-core:1.6.1',
'org.powermock:powermock-module-junit4:1.6.1',
'org.powermock:powermock-api-mockito:1.6.1'
}
}