/* Ċ Ġ* ĠLicensed Ġto Ġthe ĠApache ĠSoftware ĠFoundation Ġ( ASF ) Ġunder Ġone Ċ Ġ* Ġor Ġmore Ġcontributor Ġlicense Ġagreements . Ġ ĠSee Ġthe ĠNOTICE Ġfile Ċ Ġ* Ġdistributed Ġwith Ġthis Ġwork Ġfor Ġadditional Ġinformation Ċ Ġ* Ġregarding Ġcopyright Ġownership . Ġ ĠThe ĠASF Ġlicenses Ġthis Ġfile Ċ Ġ* Ġto Ġyou Ġ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 Ċ Ġ* Ċ Ġ* ĠĠĠĠ Ġhttp :// 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 . Ċ Ġ*/ Ċ Ċ plugins Ġ{ ĊĠ Ġbase ĊĠ Ġ// ĠThis Ġplugin Ġprovides Ġa Ġtask Ġto Ġdetermine Ġwhich Ġdependencies Ġhave Ġupdates . ĊĠ Ġ// ĠAdditionally , Ġthe Ġplugin Ġchecks Ġfor Ġupdates Ġto ĠGradle Ġitself . ĊĠ Ġ// ĊĠ Ġ// ĠSee Ġhttps :// github . com / ben - man es / gradle - versions - plugin Ġfor Ġfurther Ġdetails . ĊĠ Ġid (" com . github . ben - man es . versions ") Ġversion Ġ" 0 . 3 3 . 0 " ĊĠ Ġ// ĠApply Ġone Ġtop Ġlevel Ġrat Ġplugin Ġto Ġperform Ġany Ġrequired Ġlicense Ġenforce ment Ġanalysis ĊĠ Ġid (" org . no sphere . apache . rat ") Ġversion Ġ" 0 . 7 . 0 " ĊĠ Ġ// ĠEnable Ġgradle - based Ġrelease Ġmanagement ĊĠ Ġid (" net . research gate . release ") Ġversion Ġ" 2 . 8 . 1 " ĊĠ Ġid (" org . apache . beam . module ") ĊĠ Ġid (" org . sonar q ube ") Ġversion Ġ" 3 . 0 " Ċ } Ċ Ċ /**************************************************************** ******************************** */ Ċ // ĠConfigure Ġthe Ġroot Ġproject Ċ Ċ tasks . rat Ġ{ ĊĠ Ġ// ĠSet Ġinput Ġdirectory Ġto Ġthat Ġof Ġthe Ġroot Ġproject Ġinstead Ġof Ġthe ĠC WD . ĠThis ĊĠ Ġ// Ġmakes Ġ. gitignore Ġrules Ġ( added Ġbelow ) Ġwork Ġproperly . ĊĠ Ġinput Dir . set ( project . rootDir ) ĊĊĠ Ġval Ġex clusions Ġ= Ġmutable ListOf ( ĊĠĠĠ Ġ// ĠIgnore Ġfiles Ġwe Ġtrack Ġbut Ġdo Ġnot Ġdistribute ĊĠĠĠ Ġ"** /. github /** /* ", ĊĠĠĠ Ġ"** /. git keep ", ĊĠĠĠ Ġ" gradle w ", ĊĠĠĠ Ġ" gradle w . bat ", ĊĠĠĠ Ġ" gradle / wrapper / gradle - wrapper . properties ", ĊĊĠĠĠ Ġ" **/ package - list ", ĊĠĠĠ Ġ" **/ test . av sc ", ĊĠĠĠ Ġ" **/ user . av sc ", ĊĠĠĠ Ġ" **/ test / resources /**/*. txt ", ĊĠĠĠ Ġ" **/ test / resources /**/*. csv ", ĊĠĠĠ Ġ" **/ test /** /. placeholder ", ĊĊĠĠĠ Ġ// ĠDefault Ġec lipse Ġexclude s Ġneg lect Ġsub projects ĊĊĠĠĠ Ġ// ĠProto / grpc Ġgenerated Ġwrappers ĊĠĠĠ Ġ" **/ apache _ beam / port ability / api /* _ pb 2 *. py ", ĊĠĠĠ Ġ" **/ go / pkg / beam /**/*. pb . go ", ĊĊĠĠĠ Ġ// ĠIgnore Ġgo . sum Ġfiles , Ġwhich Ġdon 't Ġpermit Ġheaders ĊĠĠĠ Ġ" **/ go . sum ", ĊĊĠĠĠ Ġ// ĠIgnore ĠGo Ġtest Ġdata Ġfiles ĊĠĠĠ Ġ" **/ go / data /** ", ĊĊĠĠĠ Ġ// ĠV CF Ġtest Ġfiles ĊĠĠĠ Ġ" **/ apache _ beam / testing / data / vcf /* ", ĊĊĠĠĠ Ġ// ĠJDBC Ġpackage Ġconfig Ġfiles ĊĠĠĠ Ġ" **/ META - INF / services / java . sql . Driver ", ĊĊĠĠĠ Ġ// ĠWebsite Ġbuild Ġfiles ĊĠĠĠ Ġ" **/ Gem file . lock ", ĊĠĠĠ Ġ" **/ R ake file ", ĊĠĠĠ Ġ"** /. ht access ", ĊĠĠĠ Ġ" website / www / site / assets / scss /_ bootstrap . scss ", ĊĠĠĠ Ġ" website / www / site / assets / scss / bootstrap /** /* ", ĊĠĠĠ Ġ" website / www / site / assets / js /** /* ", ĊĠĠĠ Ġ" website / www / site / static / images / mas cot /*. ai ", ĊĠĠĠ Ġ" website / www / site / static / js / bootstrap *. js ", ĊĠĠĠ Ġ" website / www / site / static / js / bootstrap /** /* ", ĊĠĠĠ Ġ" website / www / site / themes ", ĊĠĠĠ Ġ" website / www / yarn . lock ", ĊĠĠĠ Ġ" website / www / package . json ", ĊĠĠĠ Ġ" website / www / site / static / js / hero / lott ie - light . min . js ", ĊĠĠĠ Ġ" website / www / site / static / js / ke en - slider . min . js ", ĊĠĠĠ Ġ" website / www / site / assets / scss /_ ke en - slider . scss ", ĊĊĠĠĠ Ġ// ĠIgnore Ġownership Ġfiles ĊĠĠĠ Ġ" ownership /** /* ", ĊĠĠĠ Ġ" **/ OWN ERS ", ĊĊĠĠĠ Ġ// ĠIgnore ĠC Python ĠLICENSE Ġfile ĊĠĠĠ Ġ" LICENSE . python ", ĊĊĠĠĠ Ġ// ĠJson Ġdoesn 't Ġsupport Ġcomments . ĊĠĠĠ Ġ"** /*. json ", ĊĊĠĠĠ Ġ// ĠK at as Ġfiles ĊĠĠĠ Ġ" learning / kat as /** / course - remote - info . yaml ", ĊĠĠĠ Ġ" learning / kat as /** / section - remote - info . yaml ", ĊĠĠĠ Ġ" learning / kat as /** / lesson - remote - info . yaml ", ĊĠĠĠ Ġ" learning / kat as /** / task - remote - info . yaml ", ĊĠĠĠ Ġ" learning / kat as /**/*. txt ", ĊĊĠĠĠ Ġ// Ġtest Ġp 8 Ġfile Ġfor ĠSnow flake IO ĊĠĠĠ Ġ" sdk s / java / io / snow flake / src / test / resources / invalid _ test _ rsa _ key . p 8 ", ĊĠĠĠ Ġ" sdk s / java / io / snow flake / src / test / resources / valid _ test _ rsa _ key . p 8 ", ĊĊĠĠĠ Ġ// ĠMockito Ġextensions ĊĠĠĠ Ġ" sdk s / java / io / amazon - web - services 2 / src / test / resources / mockito - extensions / org . mockito . plugins . Mock Maker ", ĊĠĠĠ Ġ" sdk s / java / io / azure / src / test / resources / mockito - extensions / org . mockito . plugins . Mock Maker ", ĊĠĠĠ Ġ" sdk s / java / extensions / ml / src / test / resources / mockito - extensions / org . mockito . plugins . Mock Maker ", ĊĊĠĠĠ Ġ// ĠJupyter Lab Ġextensions ĊĠĠĠ Ġ" sdk s / python / apache _ beam / runners / interactive / extensions / apache - beam - jupyter lab - side panel / yarn . lock ", ĊĊĠĠĠ Ġ// ĠSample Ġtext Ġfile Ġfor ĠJava Ġquick start ĊĠĠĠ Ġ" sdk s / java / maven - ar che types / examples / sample . txt ", ĊĊĠĠĠ Ġ// ĠIgnore ĠFlutter Ġautogenerated Ġfiles Ġfor ĠPlay ground ĊĠĠĠ Ġ" playground / frontend /. metadata ", ĊĠĠĠ Ġ" playground / frontend / pub spec . lock ", ĊĠĠĠ Ġ" playground / frontend / assets /**/*. svg ", ĊĠĠĠ Ġ" playground / frontend / assets /**/*. png ", ĊĠĠĠ Ġ" playground / frontend / assets /**/*. jpg ", ĊĊĠĠĠ Ġ// ĠIgnore Ġ. git keep Ġfile ĊĠĠĠ Ġ"** /. git keep " ĊĠ Ġ) ĊĊĠ Ġ// ĠAdd Ġ. gitignore Ġexclude s Ġto Ġthe ĠApache ĠR at Ġex clusion Ġlist . ĠWe Ġre - create Ġthe Ġbehavior ĊĠ Ġ// Ġof Ġthe ĠApache ĠMaven ĠR at Ġplugin Ġsince Ġthe ĠApache ĠAnt ĠR at Ġplugin Ġdoesn 't Ġdo Ġthis ĊĠ Ġ// Ġautomatically . ĊĠ Ġval Ġgit Ignore Ġ= Ġproject (": "). file (". gitignore ") ĊĠ Ġif Ġ( git Ignore . exists ()) Ġ{ ĊĠĠĠ Ġval Ġgit Ignore Exclude s Ġ= Ġgit Ignore . read Lines (). filter Ġ{ Ġit . isNotEmpty () Ġ&& Ġ! it . startsWith ("# ") Ġ} ĊĠĠĠ Ġex clusions . addAll ( git Ignore Exclude s ) ĊĠ Ġ} ĊĊĠ Ġfail OnError . set ( true ) ĊĠ Ġset Exclude s ( ex clusions ) Ċ } Ċ tasks . check . get (). depends On ( tasks . rat ) Ċ Ċ // ĠDefine Ġroot Ġpre / post Ġcommit Ġtasks Ġsimpl ifying Ġwhat Ġis Ġneeded Ċ // Ġto Ġbe Ġspecified Ġon Ġthe Ġcommand line Ġwhen Ġexecuting Ġlocally . Ċ // ĠThis Ġind irection Ġalso Ġmakes ĠJenkins Ġuse Ġthe Ġbranch Ġof Ġthe ĠPR Ċ // Ġfor Ġthe Ġtest Ġdefinitions . Ċ task (" java Pre Commit ") Ġ{ ĊĠ Ġ// ĠWe Ġneed Ġto Ġlist Ġthe Ġmodel /* Ġbuilds Ġsince Ġsdk s / java / core Ġdoesn 't ĊĠ Ġ// Ġdepend Ġon Ġany Ġof Ġthe Ġmodel . ĊĠ Ġdepends On (": model : pipeline : build ") ĊĠ Ġdepends On (": model : job - management : build ") ĊĠ Ġdepends On (": model : fn - execution : build ") ĊĠ Ġdepends On (": runners : google - cloud - data flow - java : worker : legacy - worker : build ") ĊĠ Ġdepends On (": sdk s : java : core : build Needed ") ĊĠ Ġdepends On (": sdk s : java : core : build Depend ents ") ĊĠ Ġdepends On (": examples : java : pre Commit ") ĊĠ Ġdepends On (": examples : java : twitter : pre Commit ") ĊĠ Ġdepends On (": sdk s : java : extensions : sql : jdbc : pre Commit ") ĊĠ Ġdepends On (": sdk s : java : javadoc : all Javadoc ") ĊĠ Ġdepends On (": runners : direct - java : needs Runner Tests ") ĊĠ Ġdepends On (": sdk s : java : container : java 8 : docker ") Ċ } Ċ Ċ task (" sql Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : java : extensions : sql : run Basic Example ") ĊĠ Ġdepends On (": sdk s : java : extensions : sql : run Po jo Example ") ĊĠ Ġdepends On (": sdk s : java : extensions : sql : build ") ĊĠ Ġdepends On (": sdk s : java : extensions : sql : build Depend ents ") Ċ } Ċ Ċ task (" java Pre Commit Port ability Api ") Ġ{ ĊĠ Ġdepends On (": runners : google - cloud - data flow - java : worker : build ") Ċ } Ċ Ċ task (" java Post Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : java : extensions : google - cloud - platform - core : post Commit ") ĊĠ Ġdepends On (": sdk s : java : extensions : zet ask etch : post Commit ") ĊĠ Ġdepends On (": sdk s : java : io : de be z ium : integration Test ") ĊĠ Ġdepends On (": sdk s : java : io : google - cloud - platform : post Commit ") ĊĠ Ġdepends On (": sdk s : java : io : k inesis : integration Test ") ĊĠ Ġdepends On (": sdk s : java : extensions : ml : post Commit ") ĊĠ Ġdepends On (": sdk s : java : io : kafka : kafka Versions Compatibility Test ") Ċ } Ċ Ċ task (" java H adoop Versions Test ") Ġ{ ĊĠ Ġdepends On (": sdk s : java : io : hadoop - common : hadoop Versions Test ") ĊĠ Ġdepends On (": sdk s : java : io : hadoop - file - system : hadoop Versions Test ") ĊĠ Ġdepends On (": sdk s : java : io : hadoop - format : hadoop Versions Test ") ĊĠ Ġdepends On (": sdk s : java : io : h catalog : hadoop Versions Test ") ĊĠ Ġdepends On (": sdk s : java : io : parquet : hadoop Versions Test ") ĊĠ Ġdepends On (": sdk s : java : extensions : sorter : hadoop Versions Test ") ĊĠ Ġdepends On (": runners : spark : 2 : hadoop Versions Test ") Ċ } Ċ Ċ task (" sql Post Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : java : extensions : sql : post Commit ") ĊĠ Ġdepends On (": sdk s : java : extensions : sql : jdbc : post Commit ") ĊĠ Ġdepends On (": sdk s : java : extensions : sql : datacatalog : post Commit ") ĊĠ Ġdepends On (": sdk s : java : extensions : sql : hadoop Versions Test ") Ċ } Ċ Ċ task (" go Pre Commit ") Ġ{ ĊĠ Ġ// ĠEnsure Ġthe ĠPre commit Ġbuilds Ġrun Ġafter Ġthe Ġtests , Ġin Ġorder Ġto Ġavoid Ġthe ĊĠ Ġ// Ġflake Ġdescribed Ġin ĠBE AM - 1 1 9 1 8 . ĠThis Ġis Ġdone Ġby Ġsplitting Ġthem Ġinto Ġtwo ĊĠ Ġ// Ġtasks Ġand Ġusing Ġ" must Run After " Ġto Ġenforce Ġordering . ĊĠ Ġdepends On (": go Pre commit Test ") ĊĠ Ġdepends On (": go Pre commit Build ") Ċ } Ċ Ċ task (" go Pre commit Test ") Ġ{ ĊĠ Ġdepends On (": sdk s : go : go Test ") Ċ } Ċ Ċ task (" go Pre commit Build ") Ġ{ ĊĠ Ġmust Run After (": go Pre commit Test ") ĊĊĠ Ġdepends On (": sdk s : go : go Build ") ĊĠ Ġdepends On (": sdk s : go : examples : go Build ") ĊĠ Ġdepends On (": sdk s : go : test : go Build ") ĊĊĠ Ġ// ĠEnsure Ġall Ġcontainer ĠGo Ġboot Ġcode Ġbuilds Ġas Ġwell . ĊĠ Ġdepends On (": sdk s : java : container : go Build ") ĊĠ Ġdepends On (": sdk s : python : container : go Build ") ĊĠ Ġdepends On (": sdk s : go : container : go Build ") Ċ } Ċ Ċ task (" go Portable Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : go : test : ul r Valid ates Runner ") Ċ } Ċ Ċ task (" go Post Commit ") Ġ{ ĊĠ Ġdepends On (": go Integration Tests ") Ċ } Ċ Ċ task (" go Integration Tests ") Ġ{ ĊĠ Ġdo Last Ġ{ ĊĠĠĠ Ġexec Ġ{ ĊĠĠĠĠĠ Ġexecutable (" sh ") ĊĠĠĠĠĠ Ġargs ("- c ", Ġ"./ sdk s / go / test / run _ valid ates runner _ tests . sh Ġ-- runner Ġdata flow ") ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĠ Ġdepends On (": sdk s : go : test : build ") ĊĠ Ġdepends On (": runners : google - cloud - data flow - java : worker : shadow Jar ") Ċ } Ċ Ċ task (" python Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py common : pre Commit Py Common ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 6 : pre Commit Py 3 6 ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 7 : pre Commit Py 3 7 ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 8 : pre Commit Py 3 8 ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : data flow : pre Commit IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : data flow : pre Commit IT _ V 2 ") Ċ } Ċ Ċ task (" python Docs Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py common : docs ") Ċ } Ċ Ċ task (" python Docker Build Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : container : py 3 6 : docker ") ĊĠ Ġdepends On (": sdk s : python : container : py 3 7 : docker ") ĊĠ Ġdepends On (": sdk s : python : container : py 3 8 : docker ") Ċ } Ċ Ċ task (" python Lint Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 7 : lint ") Ċ } Ċ Ċ task (" python Formatter Pre Commit ") Ġ{ ĊĠ Ġdepends On (" sdk s : python : test - su ites : tox : py 3 8 : formatter ") Ċ } Ċ Ċ task (" python 3 6 Post Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : data flow : py 3 6 : post Commit IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : direct : py 3 6 : post Commit IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : portable : py 3 6 : post Commit Py 3 6 ") Ċ } Ċ Ċ task (" python 3 7 Post Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : data flow : py 3 7 : post Commit IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : direct : py 3 7 : post Commit IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : direct : py 3 7 : direct Runner IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : direct : py 3 7 : hdfs IntegrationTest ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : direct : py 3 7 : mongodb io IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : portable : py 3 7 : post Commit Py 3 7 ") Ċ } Ċ Ċ task (" python 3 8 Post Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : data flow : py 3 8 : post Commit IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : direct : py 3 8 : post Commit IT ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : direct : py 3 8 : hdfs IntegrationTest ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : portable : py 3 8 : post Commit Py 3 8 ") Ċ } Ċ Ċ task (" portable Python Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : portable : py 3 6 : pre Commit Py 3 6 ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : portable : py 3 7 : pre Commit Py 3 7 ") Ċ } Ċ Ċ task (" python Spark Post Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : portable : py 3 6 : spark Valid ates Runner ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : portable : py 3 7 : spark Valid ates Runner ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : portable : py 3 8 : spark Valid ates Runner ") Ċ } Ċ Ċ task (" website Pre Commit ") Ġ{ ĊĠ Ġdepends On (": website : pre Commit ") Ċ } Ċ Ċ task (" community Metrics Pre Commit ") Ġ{ ĊĠ Ġdepends On (": beam - test - infra - metrics : pre Commit ") Ċ } Ċ Ċ task (" community Metrics Pro ber ") Ġ{ ĊĠ Ġdepends On (": beam - test - infra - metrics : check Pro ber ") Ċ } Ċ Ċ task (" java Examples Data flow Pre commit ") Ġ{ ĊĠ Ġdepends On (": runners : google - cloud - data flow - java : examples : pre Commit ") ĊĠ Ġdepends On (": runners : google - cloud - data flow - java : examples - streaming : pre Commit ") Ċ } Ċ Ċ task (" run Beam Dependency Check ") Ġ{ ĊĠ Ġdepends On (": dependency Updates ") ĊĠ Ġdepends On (": sdk s : python : dependency Updates ") Ċ } Ċ Ċ task (" whitespace Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 8 : archive Files To Lint ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 8 : unpack Files To Lint ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 8 : wh ites pac el int ") Ċ } Ċ Ċ task (" typescript Pre Commit ") Ġ{ ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 8 : eslint ") ĊĠ Ġdepends On (": sdk s : python : test - su ites : tox : py 3 8 : jest ") Ċ } Ċ Ċ task (" push All Docker Images ") Ġ{ ĊĠ Ġdepends On (": runners : spark : 2 : job - server : container : docker Push ") ĊĠ Ġdepends On (": runners : spark : 3 : job - server : container : docker Push ") ĊĠ Ġdepends On (": sdk s : java : container : push All ") ĊĠ Ġdepends On (": sdk s : python : container : push All ") ĊĠ Ġdepends On (": sdk s : go : container : push All ") ĊĠ Ġfor Ġ( version Ġin Ġproject . ext . get (" all F link Versions ") Ġas ĠArray <* >) Ġ{ ĊĠĠĠ Ġdepends On (": runners : flink :${ version }: job - server - container : docker Push ") ĊĠ Ġ} Ċ } Ċ Ċ // ĠUse Ġthis Ġtask Ġto Ġvalidate Ġthe Ġenvironment Ġset Ġup Ġfor ĠGo , ĠPython Ġand ĠJava Ċ task (" check Setup ") Ġ{ ĊĠ Ġdepends On (": sdk s : go : examples : word Count ") ĊĠ Ġdepends On (": sdk s : python : word Count ") ĊĠ Ġdepends On (": examples : java : word Count ") Ċ } Ċ Ċ // ĠConfigure Ġthe Ġrelease Ġplugin Ġto Ġdo Ġonly Ġlocal Ġwork ; Ġthe Ġrelease Ġmanager Ġdetermines Ġwhat , Ġif Ċ // Ġanything , Ġto Ġpush . ĠOn Ġfailure , Ġthe Ġrelease Ġmanager Ġcan Ġreset Ġthe Ġbranch Ġwithout Ġpushing . Ċ release Ġ{ ĊĠ Ġrevert On Fail Ġ= Ġfalse ĊĠ Ġtag Template Ġ= Ġ" v ${ version }" ĊĠ Ġ// Ġworkaround Ġfrom Ġhttps :// github . com / research gate / gradle - release / issues / 2 8 1 # issuecomment - 4 6 6 8 7 6 4 9 2 ĊĠ Ġrelease Ġ{ ĊĠĠĠ Ġwith Ġ( property Missing (" git ") Ġas Ġnet . research gate . release . Git Adapter . Git Config ) Ġ{ ĊĠĠĠĠĠ Ġrequire Branch Ġ= Ġ" release - .* | master " ĊĠĠĠĠĠ Ġpush To Remote Ġ= Ġ"" ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ // ĠReports Ġlink age Ġerrors Ġacross Ġmultiple ĠApache ĠBe am Ġartifact Ġids . Ċ // Ċ // ĠTo Ġuse Ġ( from Ġthe Ġroot Ġof Ġproject ): Ċ // ĠĠĠ Ġ./ gradle w Ġ- P publishing Ġ- P java Link age Artifact Ids = artifactId 1 , artifactId 2 ,... Ġ: check Java Link age Ċ // Ċ // ĠFor Ġexample : Ċ // ĠĠĠ Ġ./ gradle w Ġ- P publishing Ġ- P java Link age Artifact Ids = beam - sdk s - java - core , beam - sdk s - java - io - jdbc Ġ: check Java Link age Ċ // Ċ // ĠNote Ġthat Ġthis Ġtask Ġpub lishes Ġartifacts Ġinto Ġyour Ġlocal ĠMaven Ġrepository . Ċ if Ġ( project . has Property (" java Link age Artifact Ids ")) Ġ{ ĊĠ Ġif Ġ(! project . has Property (" publishing ")) Ġ{ ĊĠĠĠ Ġthrow ĠGradle Exception (" You Ġcan Ġonly Ġcheck Ġlink age Ġof ĠJava Ġartifacts Ġif Ġyou Ġspecify Ġ- P publishing Ġon Ġthe Ġcommand Ġline Ġas Ġwell .") ĊĠ Ġ} ĊĊĠ Ġval Ġlink age Checker Java Ġby Ġconfigurations . creating ĊĠ Ġdependencies Ġ{ ĊĠĠĠ Ġlink age Checker Java (" com . google . cloud . tools : dependencies : 1 . 5 . 6 ") ĊĠ Ġ} ĊĊĠ Ġ// ĠWe Ġneed Ġto Ġevaluate Ġall Ġthe Ġprojects Ġfirst Ġso Ġthat Ġwe Ġcan Ġfind Ġdepend Ġon Ġall Ġthe ĊĠ Ġ// Ġpublish Maven Java Publication To Maven Local Ġtasks Ġbelow . ĊĠ Ġfor Ġ( p Ġin Ġroot Project . sub projects ) Ġ{ ĊĠĠĠ Ġif Ġ( p . path Ġ!= Ġproject . path ) Ġ{ ĊĠĠĠĠĠ Ġevaluation Dep ends On ( p . path ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġproject . task < Java Exec >(" check Java Link age ") Ġ{ ĊĠĠĠ Ġdepends On ( project . get Tasks ByName (" publish Maven Java Publication To Maven Local ", Ġtrue Ġ/* Ġrecursively Ġ*/ )) ĊĠĠĠ Ġclasspath Ġ= Ġlink age Checker Java ĊĠĠĠ Ġmain Ġ= Ġ" com . google . cloud . tools . opensource . classpath . Link age Checker Main " ĊĠĠĠ Ġval Ġjava Link age Artifact Ids : ĠString Ġ= Ġproject . property (" java Link age Artifact Ids ") Ġas ĠString ? Ġ?: Ġ"" ĊĠĠĠ Ġvar Ġarguments Ġ= ĠarrayOf ("- a ", Ġjava Link age Artifact Ids . split ("," ). join ToString (",") Ġ{ ĊĠĠĠĠĠ Ġif Ġ( it . contains (" :" )) Ġ{ ĊĠĠĠĠĠĠĠ Ġ"${ project . ext . get (" maven GroupId ") }:${ it }" ĊĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġspecify Ġthe Ġversion Ġif Ġnot Ġprovided ĊĠĠĠĠĠĠĠ Ġ"${ project . ext . get (" maven GroupId ") }:${ it }:${ project . version }" ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ}) ĊĊĠĠĠ Ġ// ĠEx clusion Ġfile Ġfilters Ġout Ġexisting Ġlink age Ġerrors Ġbefore Ġa Ġchange ĊĠĠĠ Ġif Ġ( project . has Property (" java Link age Write Baseline ")) Ġ{ ĊĠĠĠĠĠ Ġarguments Ġ+= Ġ"-- output - ex clusion - file " ĊĠĠĠĠĠ Ġarguments Ġ+= Ġproject . property (" java Link age Write Baseline ") Ġas ĠString ĊĠĠĠ Ġ} Ġelse Ġif Ġ( project . has Property (" java Link age Read Baseline ")) Ġ{ ĊĠĠĠĠĠ Ġarguments Ġ+= Ġ"-- ex clusion - file " ĊĠĠĠĠĠ Ġarguments Ġ+= Ġproject . property (" java Link age Read Baseline ") Ġas ĠString ĊĠĠĠ Ġ} ĊĠĠĠ Ġargs (* arguments ) ĊĠĠĠ Ġdo Last Ġ{ ĊĠĠĠĠĠ Ġprintln (" NOTE : ĠThis Ġtask Ġpublished Ġartifacts Ġinto Ġyour Ġlocal ĠMaven Ġrepository . ĠYou Ġmay Ġwant Ġto Ġremove Ġthem Ġmanually .") ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ if Ġ( project . has Property (" compile And Run Tests With Java 1 1 ")) Ġ{ ĊĠ Ġtasks . get ByName (" java Pre Commit Port ability Api "). depends On (": sdk s : java : testing : test - utils : verify Java Version ") ĊĠ Ġtasks . get ByName (" java Examples Data flow Pre commit "). depends On (": sdk s : java : testing : test - utils : verify Java Version ") ĊĠ Ġtasks . get ByName (" sql Pre Commit "). depends On (": sdk s : java : testing : test - utils : verify Java Version ") Ċ } Ġelse Ġ{ ĊĠ Ġall projects Ġ{ ĊĠĠĠ Ġtasks . with Type ( Test :: class ). configure Each Ġ{ ĊĠĠĠĠĠ Ġexclude (" **/ Jvm Verification . class ") ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ