/
build.gradle.kts
86 lines (73 loc) · 1.71 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
import com.google.protobuf.gradle.protobuf
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
id("java-library")
kotlin("jvm")
id("com.google.protobuf")
id("com.squareup.wire")
}
protobuf {
protoc {
artifact = libs.protobuf.protoc.get().toString()
}
}
wire {
sourcePath {
srcDir("src/main/proto")
}
sourcePath {
srcJar(libs.protobuf.java)
include("google/protobuf/descriptor.proto")
}
protoPath {
srcJar("src/main/proto/protos.jar")
include("squareup/geology/period.proto")
}
kotlin {
buildersOnly = true
boxOneOfsMinSize = 3
includes = listOf(
"squareup.proto2.kotlin.buildersonly.*",
)
}
kotlin {
javaInterop = true
boxOneOfsMinSize = 5
generateUnrecognizedEnumConstant = true
includes = listOf(
"squareup.proto2.kotlin.*",
"squareup.proto3.kotlin.*",
"google.protobuf.*"
)
}
java {
includes = listOf(
"squareup.proto2.java.*",
"squareup.proto3.java.*"
)
}
}
sourceSets {
val test by getting {
java.srcDir("build/generated/source/proto/main/java")
}
}
dependencies {
protobuf(projects.wireSchema)
implementation(projects.wireGrpcClient)
implementation(libs.okio.core)
implementation(libs.protobuf.java)
testImplementation(projects.wireCompiler)
testImplementation(projects.wireGsonSupport)
testImplementation(projects.wireMoshiAdapter)
testImplementation(libs.assertj)
testImplementation(libs.junit)
testImplementation(libs.protobuf.javaUtil)
testImplementation(projects.wireTestUtils)
}
val test by tasks.getting(Test::class) {
testLogging {
events("passed", "skipped", "failed")
exceptionFormat = TestExceptionFormat.FULL
}
}