-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
96 lines (86 loc) · 3.01 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
id 'eu.xenit.alfresco' version '1.1.0' apply false
id 'base'
id 'idea'
}
subprojects {
// Do not configure solr-common here
if (project.name == "alfred-telemetry-solr-common") {
return;
}
apply from: "${project.projectDir}/overload.gradle"
description = "Alfred Telemetry Solr extension for ${solrFlavor} which enables exposure of Metrics using Micrometer"
plugins.withId('java') {
configurations {
implementationSources {
canBeResolved = true
canBeConsumed = false
visible = false
extendsFrom(implementation)
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category, Category.DOCUMENTATION))
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType, DocsType.SOURCES))
}
}
}
dependencies {
implementation project(':alfred-telemetry-solr:alfred-telemetry-solr-common')
}
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
dependsOn(configurations.implementationSources)
source += configurations.implementationSources.collect {
zipTree(it).matching {
include('**/*.java')
}
}
classpath += configurations.runtimeClasspath
}
sourcesJar {
dependsOn(configurations.implementationSources)
from(configurations.implementationSources.collect { zipTree(it) })
}
}
plugins.withId('eu.xenit.docker') {
dockerFile {
dockerFile = createDockerFile.getDestFile()
dockerBuild {
repository = "private.docker.xenit.eu/alfred-telemetry/solr-alfred-telemetry-${solrFlavor}"
automaticTags = false
tags = ["${version}"]
}
}
}
plugins.withId('com.github.johnrengelman.shadow') {
jar {
archiveClassifier = 'internal-jar'
}
shadowJar {
archiveClassifier = ''
dependencies {
exclude(dependency('org.slf4j:slf4j-api'))
}
ext.relocatePackage = { pkg -> relocate(pkg, "eu.xenit.alfred.telemetry.solr.internal.shadow.${pkg}") }
relocatePackage('com.codahale')
relocatePackage('com.rabbitmq')
relocatePackage('io.github.mweirauch')
relocatePackage('io.micrometer')
relocatePackage('io.prometheus')
relocatePackage('org.HdrHistogram')
relocatePackage('org.LatencyUtils')
}
publishing {
publications {
mavenJava(MavenPublication) {
project.shadow.component(it)
artifact sourcesJar
artifact javadocJar
}
}
}
}
}