import Ġcom . google . protobuf . gradle .* Ġ// Ġk tl int - disable Ġno - wildcard - imports Ċ import Ġnet . lt gt . gradle . error pr one . Check Severity Ċ import Ġnet . lt gt . gradle . error pr one . error pr one Ċ Ċ build script Ġ{ ĊĠ Ġdependencies Ġ{ ĊĠĠĠ Ġclasspath (" com . google . gu ava : gu ava : 2 8 . 1 - jre ") ĊĠ Ġ} Ċ } Ċ Ċ plugins Ġ{ ĊĠ Ġidea ĊĠ Ġec lipse ĊĠ Ġjava ĊĠ Ġid (" com . google . protobuf ") Ġversion Ġ" 0 . 8 . 1 0 " ĊĠ Ġid (" net . lt gt . error pr one ") Ġversion Ġ" 0 . 8 . 1 " ĊĠ Ġ// Ġid (" com . google . cloud . artifact registry . gradle - plugin ") Ġversion Ġ" 2 . 1 . 0 " Ċ } Ċ Ċ repositories Ġ{ ĊĠ Ġmaven Ġ{ ĊĠĠĠ Ġurl Ġ= Ġuri (" file ://${ root Project . project Dir }/ libs / maven ") ĊĠ Ġ} ĊĠ Ġmaven Central () ĊĠ Ġgoogle () ĊĠ Ġ// Ġmaven (" artifact registry :// us - maven . pkg . dev / retail - common - services - 2 4 9 0 1 6 / spe z - maven - repo ") Ċ } Ċ Ċ dependencies Ġ{ ĊĠ Ġimplementation ( project (": common ")) ĊĠ Ġimplementation (" com . google . spanner client : spanner client : 0 . 1 . 6 ") ĊĠ Ġimplementation ( Config . Lib s . types afe _ config ) ĊĠ Ġimplementation ( Config . Lib s . slf 4 j ) ĊĠ Ġ// Ġimplementation ( Config . Lib s . log back _ classic ) ĊĠ Ġ// Ġimplementation ( Config . Lib s . log back _ core ) ĊĠ Ġimplementation ( Config . Lib s . protobuf ) ĊĠ Ġimplementation ( Config . Lib s . grpc _ core ) ĊĠ Ġimplementation ( Config . Lib s . grpc _ protobuf ) ĊĠ Ġimplementation ( Config . Lib s . grpc _ stub ) ĊĠ Ġimplementation ( Config . Lib s . grpc _ netty ) ĊĠ Ġimplementation ( Config . Lib s . grpc _ native ) ĊĠ Ġimplementation ( Config . Lib s . gu ava ) ĊĠ Ġ// Ġimplementation ( Config . Lib s . spanner ) ĊĠ Ġimplementation ( Config . Lib s . pubsub ) ĊĠ Ġ// Ġimplementation ( Config . Lib s . storage ) ĊĠ Ġimplementation ( Config . Lib s . bigquery ) ĊĠ Ġ// Ġimplementation ( Config . Lib s . ro cksdb ) ĊĠ Ġimplementation (" com . google . api . grpc : proto - google - cloud - spanner - v 1 : 1 . 5 5 . 1 ") ĊĠ Ġ// Ġimplementation ( Config . Lib s . spanner ) ĊĠ Ġ// ĠB OM Ġneeded Ġfor Ġcloud - spanner ĊĠ Ġimplementation ( platform (" com . google . cloud : libraries - bom : 2 4 . 1 . 0 ")) ĊĠ Ġ// implementation (" com . google . cloud : google - cloud - spanner ") ĊĠ Ġimplementation (" com . google . cloud : google - cloud - spanner : 6 . 1 7 . 3 ") ĊĊĊĊĠ Ġ// ĠAuto Value ĊĠ Ġcompile Only (" com . google . auto . value : auto - value - annotations : 1 . 6 . 2 ") ĊĠ Ġannotation Processor (" com . google . auto . value : auto - value : 1 . 6 . 2 ") ĊĊĠ Ġ// ĠAv ro ĊĠ Ġimplementation (" org . apache . avro : avro : 1 . 8 . 2 ") ĊĠ Ġimplementation (" io . netty : netty - buffer : 4 . 1 . 3 3 . Final ") ĊĊĠ Ġ// ĠProtobuf ĊĠ Ġprotobuf ( files (" src / main / protos ")) ĊĊĠ Ġ// ĠStatic ĠAnalysis ĊĠ Ġcompile Only (" com . google . code . find bugs : js r 3 0 5 : 3 . 0 . 2 ") ĊĠ Ġannotation Processor (" com . uber . null away : null away : 0 . 7 . 5 ") ĊĠ Ġerror pr one (" com . google . error pr one : error _ pr one _ core : 2 . 3 . 3 ") ĊĠ Ġerror pr one J av ac (" com . google . error pr one : javac : 9 + 1 8 1 - r 4 1 7 3 - 1 ") ĊĊĠ Ġ// ĠOpen C ensus Ġcore ĊĠ Ġcompile (" io . openc ensus : openc ensus - api : 0 . 2 8 . 3 ") ĊĠ Ġcompile (" io . openc ensus : openc ensus - contrib - ex emp lar - util : 0 . 2 8 . 3 ") ĊĠ Ġruntime (" io . openc ensus : openc ensus - impl : 0 . 2 8 . 3 ") ĊĊĠ Ġ// ĠJ unit Ġand Ġfriends ĊĠ Ġtest Implementation (" org . junit . jupiter : junit - jupiter - engine : 5 . 6 . 2 ") ĊĠ Ġtest Implementation (" org . junit . platform : junit - platform - engine : 1 . 6 . 2 ") ĊĠ Ġtest Implementation (" org . mockito : mockito - core : 3 . 5 . 2 ") ĊĠ Ġtest Implementation (" org . mockito : mockito - inline : 3 . 5 . 2 ") ĊĠ Ġtest Implementation (" org . mockito : mockito - junit - jupiter : 3 . 5 . 2 ") ĊĠ Ġtest Implementation (" org . assertj : assertj - core : 3 . 1 6 . 1 ") ĊĠ Ġtest Implementation (" com . google . cloud : google - cloud - spanner : 2 . 0 . 2 ") ĊĠ Ġtest Implementation ( Config . Lib s . log back _ classic ) ĊĠ Ġtest Implementation ( Config . Lib s . log back _ core ) ĊĠ Ġtest Implementation ( Config . Lib s . groovy ) Ġ// ĠFor Ġlog back Ċ } Ċ Ċ tasks . test Ġ{ ĊĠ Ġuse JUnit Platform () ĊĠ Ġtest Logging Ġ{ ĊĠĠĠ Ġevents (" passed ", Ġ" skipped ", Ġ" failed ") ĊĠ Ġ} ĊĠ Ġenvironment [" GOOGLE _ APPLICATION _ CRED ENTIAL S "] Ġ= ĠSystem . getenv (" GOOGLE _ APPLICATION _ CRED ENTIAL S ") ĊĠ Ġenvironment [" GOOGLE _ CLOUD _ PROJECT "] Ġ= ĠSystem . getenv (" GOOGLE _ CLOUD _ PROJECT ") ĊĠ Ġ// system Properties [" gcp . credentials . file "] Ġ= Ġproject . properties [" gcp . credentials . file "] Ċ } Ċ Ċ // ĠError Pr one Ċ tasks . with Type < Java Compile >(). configure Each Ġ{ ĊĠ Ġoptions . compiler Args . add ("- X lint : unchecked ") ĊĠ Ġoptions . is De precation Ġ= Ġtrue ĊĠ Ġoptions . error pr one . excluded Paths . set (". */ gen / .* ") ĊĠ Ġoptions . error pr one . disable Warnings In GeneratedCode . set ( true ) ĊĊĠ Ġif Ġ(! name . toLowerCase (). contains (" test ")) Ġ{ ĊĠĠĠ Ġoptions . error pr one Ġ{ ĊĠĠĠĠĠ Ġcheck (" Null Away ", ĠCheck Severity . ERROR ) ĊĠĠĠĠĠ Ġoption (" Null Away : Annotated Packages ", Ġ" com . uber ") ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ // ĠProtobuf Ċ protobuf Ġ{ ĊĠ Ġproto c Ġ{ ĊĠĠĠ Ġ// ĠThe Ġartifact Ġspec Ġfor Ġthe ĠProtobuf ĠCompiler ĊĠĠĠ Ġartifact Ġ= Ġ" com . google . protobuf : protoc : 3 . 9 . 1 " ĊĠ Ġ} ĊĠ Ġplugins Ġ{ ĊĠĠĠ Ġ// ĠOptional : Ġan Ġartifact Ġspec Ġfor Ġa Ġproto c Ġplugin , Ġwith Ġ" grpc " Ġas ĊĠĠĠ Ġ// Ġthe Ġidentifier , Ġwhich Ġcan Ġbe Ġreferred Ġto Ġin Ġthe Ġ" plugins " ĊĠĠĠ Ġ// Ġcontainer Ġof Ġthe Ġ" generate Proto Tasks " Ġclosure . ĊĠĠĠ Ġid (" grpc ") Ġ{ ĊĠĠĠĠĠ Ġartifact Ġ= Ġ" io . grpc : protoc - gen - grpc - java : 1 . 2 2 . 1 " ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĠ Ġgenerate Proto Tasks Ġ{ ĊĠĠĠ Ġof Source Set (" main "). forEach Ġ{ ĊĠĠĠĠĠ Ġit . plugins Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠApply Ġthe Ġ" grpc " Ġplugin Ġwhose Ġspec Ġis Ġdefined Ġabove , Ġwithout Ġoptions . ĊĠĠĠĠĠĠĠ Ġid (" grpc ") ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġgenerated Files Base Dir Ġ= Ġ"$ project Dir / gen " Ċ } Ċ Ċ tasks . register (" clean Protos "). configure Ġ{ ĊĠ Ġdelete ("$ project Dir / gen ") Ċ } Ċ