package Ġcustom . script Definition Ċ Ċ import Ġjava . io . File Ċ import Ġkotlin . script . dependencies .* Ċ import Ġkotlin . script . experimental . dependencies .* Ċ import Ġkotlin . script . templates . Script Template Definition Ċ Ċ class ĠTest Dependencies Resolver Ġ: ĠDependencies Resolver Ġ{ ĊĠĠĠ Ġ@ kotlin . script . templates . Accepted Annotations ( Anno :: class ) ĊĠĠĠ Ġoverride Ġfun Ġresolve ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġscript Contents : ĠScript Contents , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġenvironment : ĠEnvironment ĊĠĠĠ Ġ): ĠDependencies Resolver . Resolve Result Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġanno FQ N Ġ= ĠAnno :: class . qualified Name !! ĊĠĠĠĠĠĠĠ Ġassert ( script Contents . annotations . single (). annotation Class . qualified Name Ġ== Ġanno FQ N ) ĊĠĠĠĠĠĠĠ Ġreturn ĠScript Dependencies ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġclasspath Ġ= ĠlistOf ( environment [" template - classes "] Ġas ĠFile ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġimports Ġ= ĠlistOf ( anno FQ N ) ĊĠĠĠĠĠĠĠ Ġ). as Success () ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Target ( Annotation Target . FILE ) Ċ annotation Ġclass ĠAnno Ċ Ċ @ Target ( Annotation Target . FILE ) Ċ annotation Ġclass ĠAnno 2 Ċ Ċ @ Script Template Definition ( Test Dependencies Resolver :: class , Ġscript File Pattern Ġ= Ġ" script . k ts ") Ċ class ĠTemplate