forked from cadence-workflow/cadence-java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
98 lines (83 loc) · 2.38 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
buildscript {
dependencies {
classpath "gradle.plugin.org.jruyi.gradle:thrift-gradle-plugin:0.4.0"
}
}
plugins {
id 'net.minecrell.licenser' version '0.3'
id "com.github.sherter.google-java-format" version "0.6"
id "net.ltgt.errorprone" version "0.0.13"
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: "org.jruyi.thrift"
apply plugin: 'maven-publish'
apply plugin: 'com.github.sherter.google-java-format'
googleJavaFormat {
toolVersion '1.5'
include '**/*.java'
exclude '**/generated-sources/*'
}
group = 'com.uber'
version = '0.2.0-SNAPSHOT'
description = """Uber Cadence Java Client"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile group: 'com.uber.tchannel', name: 'tchannel-core', version: '0.7.6'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.apache.thrift', name: 'libthrift', version: '0.9.3'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
compile group: 'com.uber.m3', name: 'tally-core', version: '0.2.1'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'com.googlecode.junit-toolbox', name: 'junit-toolbox', version: '2.4'
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
}
license {
header rootProject.file('license-header.txt')
exclude 'com/uber/cadence/*.java' // generated code
}
compileJava {
dependsOn 'googleJavaFormat'
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-XepExcludedPaths:" +
".*/generated-sources/.*"
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
}
}
repositories {
mavenLocal()
}
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
showStandardStreams true
}
}