-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
71 lines (60 loc) · 2.4 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
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id "com.jfrog.bintray" version "1.7.3"
}
allprojects {
// apply plugin: 'license'
project.version = "git describe --always --dirty".execute().text.trim()
println("version : '${project.version}'")
group = "io.opentracing.contrib"
project.ext.description="OpenTracing Tracer that report traces (on logs, metrics,...)"
project.ext.website_url="https://github.com/opentracing-contrib/${rootProject.name}"
project.ext.issue_url="${project.website_url}/issues"
project.ext.scm_github_repo="opentracing-contrib/${rootProject.name}"
project.ext.scm_url="https://github.com/${project.scm_github_repo}"
project.ext.license_name="Apache-2.0" // use value of bintray license enum
project.ext.license_url="https://www.apache.org/licenses/LICENSE-2.0.txt"
project.ext.license_year=Calendar.getInstance().get(Calendar.YEAR)
project.ext.license_owner="The OpenTracing Authors"
}
subprojects {
apply plugin: 'java'
if(!project.name.contains('examples')){
apply from: rootProject.file('build-publish.gradle')
}
repositories {
jcenter()
//maven { url "https://jitpack.io" }
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
javadoc {
failOnError = false
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.docTitle = "${project.name} ${project.version} Javadoc"
options.windowTitle = "${project.name} ${project.version} Javadoc"
options.header = "<b>${project.name} ${project.version}</b>"
options.author = "true"
options.use = "true"
//disable doclint for JDK8, more quiet output
if (JavaVersion.current().isJava8Compatible()){
options.addStringOption('Xdoclint:none', '-quiet')
}
}
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
classifier = 'sources'
from sourceSets*.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc, description: 'Creates a jar from the javadoc files.') {
classifier = 'javadoc'
from javadoc.destinationDir
}
license {
header = rootProject.file("src/etc/header.txt")
strictCheck = true
ext.license_year = project.license_year
ext.license_owner = license_owner
excludes(['src/test/resources/**', 'src/main/resources/**'])
}
}