@ file : Suppress (" Un stable Api Usage ") Ċ Ċ package Ġmb . sp oof ax . compiler . gradle . sp oof ax core Ċ Ċ import Ġmb . resource . Resource Service Ċ import Ġmb . sp oof ax . compiler . sp oof ax core .* Ċ import Ġmb . sp oof ax . compiler . util . Gradle Dependency Ċ import Ġmb . sp oof ax . compiler . util . Gradle Project Ċ import Ġorg . gradle . api . Gradle Exception Ċ import Ġorg . gradle . api . Plugin Ċ import Ġorg . gradle . api . Project Ċ import Ġorg . gradle . api . model . ObjectFactory Ċ import Ġorg . gradle . api . plugins . Java Plugin Ċ import Ġorg . gradle . api . provider . Property Ċ import Ġorg . gradle . kotlin . dsl .* Ċ Ċ open Ġclass ĠAdapter Project Compiler Settings ( ĊĠ Ġval Ġadapter Project : ĠAdapter Project . Builder Ġ= ĠAdapter Project . builder (), ĊĠ Ġval Ġparser : ĠParser Compiler . Adapter Project Input . Builder Ġ= ĠParser Compiler . Adapter Project Input . builder (), ĊĠ Ġval Ġsty ler : ĠSty ler Compiler . Adapter Project Input . Builder ? Ġ= Ġnull , Ġ// ĠOptional ĊĠ Ġval Ġcomp leter : ĠComp leter Compiler . Adapter Project Input . Builder ? Ġ= Ġnull , Ġ// ĠOptional ĊĠ Ġval Ġstr ateg o Runtime : ĠStr ateg o Runtime Compiler . Adapter Project Input . Builder ? Ġ= Ġnull , Ġ// ĠOptional ĊĠ Ġval Ġconstraint Analyzer : ĠConstraint Analyzer Compiler . Adapter Project Input . Builder ? Ġ= Ġnull , Ġ// ĠOptional ĊĠ Ġval Ġcompiler : ĠAdapter Project Compiler . Input . Builder Ġ= ĠAdapter Project Compiler . Input . builder () Ċ ) Ġ{ ĊĠ Ġinternal Ġfun Ġcreate Input ( shared : ĠShared , Ġlanguage Project Input : ĠLanguage Project Compiler . Input , Ġproject : ĠGradle Project , Ġlanguage Project Dependency : ĠGradle Dependency ): ĠAdapter Project Compiler . Input Ġ{ ĊĠĠĠ Ġval Ġadapter Project Ġ= Ġthis . adapter Project . shared ( shared ). project ( project ). build () ĊĠĠĠ Ġval Ġparser Ġ= Ġthis . parser . shared ( shared ). adapter Project ( adapter Project ). language Project Input ( language Project Input . parser ()). build () ĊĠĠĠ Ġval Ġsty ler Ġ= Ġif ( this . sty ler Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġif (! language Project Input . sty ler (). isPresent ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthrow ĠGradle Exception (" St y ler Ġadapter Ġproject Ġinput Ġis Ġpresent , Ġbut Ġsty ler Ġlanguage Ġproject Ġinput Ġis Ġnot ") ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġthis . sty ler . shared ( shared ). adapter Project ( adapter Project ). language Project Input ( language Project Input . sty ler (). get ()). build () ĊĠĠĠ Ġ} Ġelse Ġnull ĊĠĠĠ Ġval Ġcomp leter Ġ= Ġif ( this . comp leter Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġif (! language Project Input . comp leter (). isPresent ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthrow ĠGradle Exception (" Comp leter Ġadapter Ġproject Ġinput Ġis Ġpresent , Ġbut Ġcomp leter Ġlanguage Ġproject Ġinput Ġis Ġnot ") ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġthis . comp leter . shared ( shared ). adapter Project ( adapter Project ). language Project Input ( language Project Input . comp leter (). get ()). build () ĊĠĠĠ Ġ} Ġelse Ġnull ĊĠĠĠ Ġval Ġstr ateg o Runtime Ġ= Ġif ( this . str ateg o Runtime Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġif (! language Project Input . str ateg o Runtime (). isPresent ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthrow ĠGradle Exception (" Str ateg o Ġruntime Ġadapter Ġproject Ġinput Ġis Ġpresent , Ġbut ĠStr ateg o Ġruntime Ġlanguage Ġproject Ġinput Ġis Ġnot ") ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġthis . str ateg o Runtime . language Project Input ( language Project Input . str ateg o Runtime (). get ()). build () ĊĠĠĠ Ġ} Ġelse Ġnull ĊĠĠĠ Ġval Ġconstraint Analyzer Ġ= Ġif ( this . constraint Analyzer Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġif (! language Project Input . constraint Analyzer (). isPresent ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthrow ĠGradle Exception (" Constraint Ġanalyzer Ġadapter Ġproject Ġinput Ġis Ġpresent , Ġbut Ġconstraint Ġanalyzer Ġruntime Ġlanguage Ġproject Ġinput Ġis Ġnot ") ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġthis . constraint Analyzer . shared ( shared ). adapter Project ( adapter Project ). language Project Input ( language Project Input . constraint Analyzer (). get ()). build () ĊĠĠĠ Ġ} Ġelse Ġnull ĊĠĠĠ Ġval Ġcompiler Ġ= Ġthis . compiler . shared ( shared ). adapter Project ( adapter Project ). parser ( parser ). language Project Dependency ( language Project Dependency ) ĊĠĠĠ Ġif ( sty ler Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġcompiler . sty ler ( sty ler ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġif ( comp leter Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġcompiler . comp leter ( comp leter ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġif ( str ateg o Runtime Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġcompiler . str ateg o Runtime ( str ateg o Runtime ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġif ( constraint Analyzer Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġcompiler . constraint Analyzer ( constraint Analyzer ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġcompiler . build () ĊĠ Ġ} Ċ } Ċ Ċ open Ġclass ĠAdapter Project Compiler Extension ( ĊĠ Ġobjects : ĠObject Factory , ĊĠ Ġcompiler Extension : ĠSp oof ax Compiler Extension Ċ ) Ġ{ ĊĠ Ġval Ġsettings : ĠProperty < Adapter Project Compiler Settings > Ġ= Ġobjects . property () ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġinternal Ġconst Ġval Ġid Ġ= Ġ" adapter Project Compiler " ĊĠ Ġ} ĊĊĠ Ġinit Ġ{ ĊĠĠĠ Ġsettings . convention ( Adapter Project Compiler Settings ()) ĊĠ Ġ} ĊĊĠ Ġinternal Ġval Ġproject Ġby Ġlazy Ġ{ ĊĠĠĠ Ġcompiler Extension . adapter Gradle Project . finalize Value () ĊĠĠĠ Ġif (! compiler Extension . adapter Gradle Project . isPresent ) Ġ{ ĊĠĠĠĠĠ Ġthrow ĠGradle Exception (" Adapter Ġproject Ġwas Ġnot Ġset ") ĊĠĠĠ Ġ} ĊĠĠĠ Ġcompiler Extension . adapter Gradle Project . get (). to Sp oof ax Compiler Project () ĊĠ Ġ} ĊĊĠ Ġinternal Ġval Ġinput : ĠAdapter Project Compiler . Input Ġby Ġlazy Ġ{ ĊĠĠĠ Ġsettings . finalize Value () ĊĠĠĠ Ġval Ġlanguage Project Extension Ġ= Ġcompiler Extension . language Project Compiler Extension ĊĠĠĠ Ġsettings . get (). create Input ( compiler Extension . shared , Ġlanguage Project Extension . input , Ġproject , Ġlanguage Project Extension . project . as Project Dependency ()) ĊĠ Ġ} Ċ } Ċ Ċ open Ġclass ĠAdapter Plugin Ġ: ĠPlugin < Project > Ġ{ ĊĠ Ġoverride Ġfun Ġapply ( project : ĠProject ) Ġ{ ĊĠĠĠ Ġval Ġcompiler Extension Ġ= Ġproject . extensions . getBy Type < Sp oof ax Compiler Extension >() ĊĠĠĠ Ġval Ġextension Ġ= ĠAdapter Project Compiler Extension ( project . objects , Ġcompiler Extension ) ĊĠĠĠ Ġproject . extensions . add ( Adapter Project Compiler Extension . id , Ġextension ) ĊĠĠĠ Ġcompiler Extension . adapter Gradle Project . set ( project ) ĊĊĠĠĠ Ġproject . gradle . projects Evalu ated Ġ{ ĊĠĠĠĠĠ Ġafter Evaluate ( project , Ġcompiler Extension , Ġextension ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/* ĊĠĠĠ ĠH ACK : Ġapply Ġplugins Ġeager ly , Ġotherwise Ġtheir Ġ' after Evaluate ' Ġwill Ġnot Ġbe Ġtriggered Ġand Ġthe Ġplugin Ġwill Ġdo Ġnothing . ĊĠĠĠ ĠEnsure Ġthat Ġplugins Ġare Ġapplied Ġafter Ġwe Ġadd Ġa Ġ' projects Evalu ated ' Ġlistener , Ġto Ġensure Ġthat Ġour Ġlistener Ġgets ĊĠĠĠ Ġexecuted Ġbefore Ġthose Ġof Ġthe Ġfollowing Ġplugins . ĊĠĠĠ Ġ*/ ĊĠĠĠ Ġproject . plugins . apply (" org . metab org . gradle . config . java - library ") ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġafter Evaluate ( project : ĠProject , Ġcompiler Extension : ĠSp oof ax Compiler Extension , Ġextension : ĠAdapter Project Compiler Extension ) Ġ{ ĊĠĠĠ Ġval Ġcompiler Ġ= Ġcompiler Extension . adapter Project Compiler ĊĠĠĠ Ġval Ġresource Service Ġ= Ġcompiler Extension . resource Service ĊĠĠĠ Ġval Ġinput Ġ= Ġextension . input ĊĠĠĠ Ġval Ġcompiler Project Ġ= Ġinput . adapter Project (). project (); ĊĠĠĠ Ġproject . configure Group ( compiler Project ) ĊĠĠĠ Ġproject . configure Version ( compiler Project ) ĊĠĠĠ Ġproject . configure Generated Sources ( compiler Project , Ġresource Service ) ĊĠĠĠ Ġcompiler . get Dependencies ( input ). forEach Ġ{ ĊĠĠĠĠĠ Ġit . addTo Dependencies ( project ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġconfigure Compiler Task ( project , Ġinput , Ġcompiler , Ġresource Service ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġconfigure Compiler Task ( ĊĠĠĠ Ġproject : ĠProject , ĊĠĠĠ Ġinput : ĠAdapter Project Compiler . Input , ĊĠĠĠ Ġcompiler : ĠAdapter Project Compiler , ĊĠĠĠ Ġresource Service : ĠResource Service ĊĠ Ġ) Ġ{ ĊĠĠĠ Ġval Ġcompile Task Ġ= Ġproject . tasks . register (" sp oof ax Compile Adapter Project ") Ġ{ ĊĠĠĠĠĠ Ġgroup Ġ= Ġ" sp oof ax Ġcompiler " ĊĠĠĠĠĠ Ġinputs . property (" input ", Ġinput ) ĊĠĠĠĠĠ Ġoutputs . files ( input . provided Files (). map Ġ{ Ġresource Service . to Local File ( it ) Ġ}) ĊĠĠĠĠĠ Ġdo Last Ġ{ ĊĠĠĠĠĠĠĠ Ġproject . delete Gen Source Sp oof ax Directory ( input . adapter Project (). project (), Ġresource Service ) ĊĠĠĠĠĠĠĠ Ġcompiler . compile ( input ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġproject . tasks . get ByName ( Java Plugin . COMPILE _ JAVA _ TASK _ NAME ). depends On ( compile Task ) ĊĠ Ġ} Ċ } Ċ