xref: /aosp_15_r20/external/grpc-grpc-java/istio-interop-testing/build.gradle (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1*e07d83d3SAndroid Build Coastguard Workerplugins {
2*e07d83d3SAndroid Build Coastguard Worker    id "application"
3*e07d83d3SAndroid Build Coastguard Worker    id "java"
4*e07d83d3SAndroid Build Coastguard Worker
5*e07d83d3SAndroid Build Coastguard Worker    id "com.google.protobuf"
6*e07d83d3SAndroid Build Coastguard Worker    id 'com.google.cloud.tools.jib'
7*e07d83d3SAndroid Build Coastguard Worker    id "ru.vyarus.animalsniffer"
8*e07d83d3SAndroid Build Coastguard Worker}
9*e07d83d3SAndroid Build Coastguard Worker
10*e07d83d3SAndroid Build Coastguard Workerdescription = "gRPC: Istio Interop testing"
11*e07d83d3SAndroid Build Coastguard Worker
12*e07d83d3SAndroid Build Coastguard Workerconfigurations {
13*e07d83d3SAndroid Build Coastguard Worker    alpnagent
14*e07d83d3SAndroid Build Coastguard Worker}
15*e07d83d3SAndroid Build Coastguard Worker
16*e07d83d3SAndroid Build Coastguard Workerdependencies {
17*e07d83d3SAndroid Build Coastguard Worker    implementation  project(':grpc-core'),
18*e07d83d3SAndroid Build Coastguard Worker            project(':grpc-netty'),
19*e07d83d3SAndroid Build Coastguard Worker            project(':grpc-protobuf'),
20*e07d83d3SAndroid Build Coastguard Worker            project(':grpc-services'),
21*e07d83d3SAndroid Build Coastguard Worker            project(':grpc-stub'),
22*e07d83d3SAndroid Build Coastguard Worker            project(':grpc-testing'),
23*e07d83d3SAndroid Build Coastguard Worker            project(':grpc-xds')
24*e07d83d3SAndroid Build Coastguard Worker
25*e07d83d3SAndroid Build Coastguard Worker    compileOnly libraries.javax.annotation
26*e07d83d3SAndroid Build Coastguard Worker
27*e07d83d3SAndroid Build Coastguard Worker    runtimeOnly libraries.netty.tcnative,
28*e07d83d3SAndroid Build Coastguard Worker            libraries.netty.tcnative.classes
29*e07d83d3SAndroid Build Coastguard Worker    testImplementation testFixtures(project(':grpc-context')),
30*e07d83d3SAndroid Build Coastguard Worker            testFixtures(project(':grpc-api')),
31*e07d83d3SAndroid Build Coastguard Worker            testFixtures(project(':grpc-core')),
32*e07d83d3SAndroid Build Coastguard Worker            libraries.mockito.core,
33*e07d83d3SAndroid Build Coastguard Worker            libraries.junit,
34*e07d83d3SAndroid Build Coastguard Worker            libraries.truth
35*e07d83d3SAndroid Build Coastguard Worker    alpnagent libraries.jetty.alpn.agent
36*e07d83d3SAndroid Build Coastguard Worker
37*e07d83d3SAndroid Build Coastguard Worker    signature libraries.signature.java
38*e07d83d3SAndroid Build Coastguard Worker}
39*e07d83d3SAndroid Build Coastguard Worker
40*e07d83d3SAndroid Build Coastguard WorkersourceSets {
41*e07d83d3SAndroid Build Coastguard Worker    main {
42*e07d83d3SAndroid Build Coastguard Worker        proto {
43*e07d83d3SAndroid Build Coastguard Worker            srcDir 'third_party/istio/src/main/proto'
44*e07d83d3SAndroid Build Coastguard Worker        }
45*e07d83d3SAndroid Build Coastguard Worker    }
46*e07d83d3SAndroid Build Coastguard Worker}
47*e07d83d3SAndroid Build Coastguard Worker
48*e07d83d3SAndroid Build Coastguard WorkerconfigureProtoCompilation()
49*e07d83d3SAndroid Build Coastguard Worker
50*e07d83d3SAndroid Build Coastguard Workerimport net.ltgt.gradle.errorprone.CheckSeverity
51*e07d83d3SAndroid Build Coastguard Worker
52*e07d83d3SAndroid Build Coastguard Workertasks.named("compileJava").configure {
53*e07d83d3SAndroid Build Coastguard Worker    // This isn't a library; it can use beta APIs
54*e07d83d3SAndroid Build Coastguard Worker    options.errorprone.check("BetaApi", CheckSeverity.OFF)
55*e07d83d3SAndroid Build Coastguard Worker}
56*e07d83d3SAndroid Build Coastguard Worker
57*e07d83d3SAndroid Build Coastguard Worker
58*e07d83d3SAndroid Build Coastguard Worker// For releasing to Docker Hub
59*e07d83d3SAndroid Build Coastguard Workerjib {
60*e07d83d3SAndroid Build Coastguard Worker    from.image = "gcr.io/distroless/java:8"
61*e07d83d3SAndroid Build Coastguard Worker    container {
62*e07d83d3SAndroid Build Coastguard Worker        ports = ['50051']
63*e07d83d3SAndroid Build Coastguard Worker        mainClass="io.grpc.testing.istio.EchoTestServer"
64*e07d83d3SAndroid Build Coastguard Worker    }
65*e07d83d3SAndroid Build Coastguard Worker    outputPaths {
66*e07d83d3SAndroid Build Coastguard Worker        tar = 'build/istio-echo-server.tar'
67*e07d83d3SAndroid Build Coastguard Worker        digest = 'build/istio-echo-server.digest'
68*e07d83d3SAndroid Build Coastguard Worker        imageId = 'build/istio-echo-server.id'
69*e07d83d3SAndroid Build Coastguard Worker    }
70*e07d83d3SAndroid Build Coastguard Worker}
71