forked from googleapis/gax-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
86 lines (75 loc) · 2.39 KB
/
build.gradle.kts
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
/*
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.google.protobuf.gradle.protobuf
import com.google.protobuf.gradle.protoc
import com.google.protobuf.gradle.plugins
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.remove
import com.google.protobuf.gradle.generateProtoTasks
import com.google.protobuf.gradle.ofSourceSet
plugins {
idea
maven
kotlin("jvm")
`java-library`
id("com.google.protobuf") version "3.17.3"
jacoco
}
base {
archivesBaseName = "kgax-grpc-android"
}
dependencies {
implementation(kotlin("stdlib"))
implementation("javax.annotation:javax.annotation-api:${ext["javax_annotation_version"]}")
api(project(":kgax-grpc-base"))
api("io.grpc:grpc-okhttp:${ext["grpc_version"]}")
api("io.grpc:grpc-android:${ext["grpc_version"]}")
api("io.grpc:grpc-protobuf-lite:${ext["grpc_version"]}")
testImplementation(kotlin("test"))
testImplementation(kotlin("test-junit"))
testImplementation("junit:junit:${ext["junit_version"]}")
testImplementation("com.nhaarman:mockito-kotlin:${ext["mockito_kotlin_version"]}")
testImplementation("com.google.truth:truth:${ext["truth_version"]}")
}
java {
sourceSets {
getByName("main").proto.srcDir("$projectDir/../api-common-protos")
getByName("main").proto.srcDir("$projectDir/../api-android-protos")
}
}
jacoco {
toolVersion = "0.8.2"
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${ext["protoc_version"]}"
}
plugins {
id("javalite") {
artifact = "com.google.protobuf:protoc-gen-javalite:${ext["protoc_gen_javalite_version"]}"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.builtins {
remove("java")
}
it.plugins {
id("javalite")
}
}
}
}