-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
105 lines (91 loc) · 2.36 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
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'com.google.protobuf'
apply plugin: 'jacoco'
apply plugin: 'maven'
// Java compatibility.
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'com.github.pintia'
buildscript {
ext {
// Global version variable.
kotlinVersion = '1.3.10'
codecVersion = '3.10.2'
}
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
}
}
repositories {
jcenter()
}
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 sourcesJar
archives javadocJar
}
// Add Kotlin and protobuf generated codes into source sets.
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += file("${protobuf.generatedFilesBaseDir}/test/java")
test.java.srcDirs += file("${protobuf.generatedFilesBaseDir}/test/grpc")
}
dependencies {
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
// Protocol Buffer
compile 'com.google.protobuf:protobuf-java:3.6.1'
// Redisson, codec and hashing algorithm
compile 'de.ruedigermoeller:fst:2.56'
compile "org.redisson:redisson:${codecVersion}"
testCompile 'org.xerial.snappy:snappy-java:1.1.7.2'
testCompile "org.assertj:assertj-core:3.10.0"
testCompile 'org.slf4j:slf4j-simple:1.7.21'
testCompile "org.testcontainers:testcontainers:1.10.6"
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
apiVersion = "1.3"
languageVersion = "1.3"
javaParameters = true
}
}
compileTestKotlin {
dependsOn('generateTestProto')
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
apiVersion = "1.3"
languageVersion = "1.3"
javaParameters = true
}
}
protobuf {
protoc {
// The artifact spec for the Protobuf Compiler
artifact = 'com.google.protobuf:protoc:3.6.1'
}
}
jacoco {
toolVersion = "0.8.1"
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled true
html.enabled true
}
}