import Ġcom . github . bread mo ir ai . Github Release Extension Ċ import Ġcom . mat thew pre n ger . cur se gradle . Cur se Project Ċ import Ġcom . mat thew pre n ger . cur se gradle . Cur se Relation Ċ import Ġcom . mat thew pre n ger . cur se gradle . Options Ċ import Ġorg . gradle . jvm . tasks . Jar Ċ import Ġorg . apache . tools . ant . filters . Replace Tokens Ċ import Ġorg . aj ober star . gr git . G rg it Ċ Ċ plugins Ġ{ ĊĠĠĠ Ġkotlin (" jvm ") Ġversion Ġ" 1 . 3 . 2 1 " ĊĠĠĠ Ġid (" fabric - loom ") Ġversion Ġ" 0 . 2 . 0 - SNAPSHOT " ĊĠĠĠ Ġid (" com . mat thew pre n ger . cur se gradle ") Ġversion Ġ" 1 . 1 . 2 " ĊĠĠĠ Ġid (" com . github . bread mo ir ai . github - release ") Ġversion Ġ" 2 . 2 . 4 " ĊĠĠĠ Ġid (" org . aj ober star . gr git ") Ġversion Ġ" 3 . 0 . 0 " Ċ } Ċ Ċ val ĠBUILD _ NO : ĠString ? Ġby Ġproject Ċ val Ġbuild No Ġ= ĠBUILD _ NO Ġ?: Ġ" SNAPSHOT " Ċ Ċ val Ġproject _ version : ĠString Ġby Ġproject Ċ val Ġversion _ mc : ĠString Ġby Ġproject Ċ val Ġversion _ mc _ jar : ĠString Ġby Ġproject Ċ val Ġversion _ mc _ mappings : ĠString Ġby Ġproject Ċ val Ġversion _ fabric : ĠString Ġby Ġproject Ċ val Ġversion _ fabric _ loader : ĠString Ġby Ġproject Ċ val Ġversion _ fabric _ kotlin : ĠString Ġby Ġproject Ċ val Ġversion _ kotlin : ĠString Ġby Ġproject Ċ val Ġversion _ h 3 nt _ common utils : ĠString Ġby Ġproject Ċ val Ġcur se _ api _ key : ĠString ? Ġby Ġproject Ċ val Ġproject _ cur se forge _ id : ĠString Ġby Ġproject Ċ /* Ġval Ġchangelog : ĠString ? Ġby Ġproject Ġ*/ Ċ val Ġgithub _ release _ token : ĠString ? Ġby Ġproject Ċ Ċ group Ġ= Ġ" com . he a 3 ven . d ul ce de le che " Ċ version Ġ= Ġ"$ project _ version -$ build No " Ċ Ċ base Ġ{ Ċ ĉ archives Base Name Ġ= Ġ" d ul ce de le che " Ċ } Ċ Ċ tasks . compile Java ĠĠ Ġ{ ĊĠ Ġsource Compatibility Ġ= Ġ" 1 . 8 " ĊĠ Ġtarget Compatibility Ġ= Ġ" 1 . 8 " Ċ } Ċ Ċ repositories Ġ{ ĊĠĠĠ Ġmaven ( url =" http :// m ri be ck y . com . ar / maven ") Ġ{ ĊĠĠĠĠĠĠĠ Ġname Ġ= Ġ" He a 3 ve N " ĊĠĠĠ Ġ} ĊĠĠĠ Ġmaven ( url Ġ= Ġ" https :// kotlin . bin tray . com / kotlin x ") Ġ{ ĊĠĠĠĠĠĠĠ Ġname Ġ= Ġ" Kotlin ĠX " ĊĠĠĠ Ġ} Ċ } Ċ Ċ val Ġshadow Ġby Ġconfigurations . creating Ġ{ Ċ ĉ is Trans itive Ġ= Ġfalse Ċ } Ċ Ċ /* Ġcompile Only . extends From ( configurations . Ġ*/ Ċ Ċ dependencies Ġ{ Ċ ĉ minecraft (" com . moj ang : minecraft :$ version _ mc _ jar ") Ċ ĉ mappings (" net . fabric mc : yarn :$ version _ mc _ mappings ") Ċ ĉ mod Compile (" net . fabric mc : fabric - loader :$ version _ fabric _ loader ") ĊĊ ĉ mod Compile (" net . fabric mc : fabric :$ version _ fabric ") ĊĊĠĠĠ Ġmod Compile (" net . fabric mc : fabric - language - kotlin :$ version _ fabric _ kotlin ") ĊĠĠĠ Ġcompile Only (" org . jetbrains . kotlin : kotlin - stdlib :$ version _ kotlin ") ĊĊĠĠĠ Ġmod Compile (" com . he a 3 ven . tools . common utils : h 3 nt - common utils :$ version _ h 3 nt _ common utils ") ĊĠĠĠ Ġshadow (" com . he a 3 ven . tools . common utils : h 3 nt - common utils :$ version _ h 3 nt _ common utils ") ĊĊĠĠĠ Ġcompile Only (" com . google . code . find bugs : js r 3 0 5 : 3 . 0 . 2 ") Ċ } Ċ Ċ tasks . process Resources Ġ{ ĊĠĠĠ Ġfiles Matching (" ** /*. json ") Ġ{ ĊĠĠĠĠĠĠĠ Ġfilter < Replace Tokens >(" tokens " Ġto Ġmap Of ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" version " Ġto Ġproject . version . toString (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" version _ fabric " Ġto Ġ"$ version _ fabric ". toString (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" version _ kotlin " Ġto Ġ"$ version _ kotlin ". toString (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" version _ fabric _ kotlin " Ġto Ġ"$ version _ fabric _ kotlin ". toString () ĊĠĠĠĠĠĠĠ Ġ)) ĊĠĠĠ Ġ} Ċ } Ċ Ċ tasks . with Type < Jar > Ġ{ ĊĠĠĠ Ġfrom ( configurations [" shadow "]. as File Tree . files . map Ġ{ Ġzip Tree ( it ) Ġ}) Ċ } Ċ Ċ val Ġversion Regex Ġ= ĠRegex (" v [ 0 - 9 ]. * ") Ċ val Ġversion Exclude Regex Ġ= ĠRegex (" v 1 .( 9 (. 4 )? | 1 0 )- .* ") Ċ var Ġrepo Ġ= ĠG rg it . open () Ċ val Ġlast Version Tag Ġ= Ġrepo . tag . list () ĊĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġit . fullName . substring ( 1 0 ) Ġ} ĊĠĠĠĠĠĠĠ Ġ. filter Not ( version Exclude Regex :: matches ) ĊĠĠĠĠĠĠĠ Ġ. filter ( version Regex :: matches ) ĊĠĠĠĠĠĠĠ Ġ. sorted With ({ a , Ġb Ġ-> Ġ-( a . split ('. '). zip ( b . split ('. ')). map Ġ{ Ġ Ġit . first . compareTo ( it . second ) Ġ}. filter Ġ{ Ġit Ġ!= Ġ 0 Ġ}. first () Ġ?: Ġ 0 ) Ġ}) ĊĠĠĠĠĠĠĠ Ġ. first () Ċ val Ġchanges Ġ= Ġrepo . log Ġ{ ĊĠĠĠ Ġrange ( last Version Tag , Ġ" HEAD ") Ċ }. filter Ġ{ ĊĠĠĠ Ġit . parent Ids . size Ġ> Ġ 1 Ċ }. map Ġ{ ĊĠĠĠ Ġit . full Message . remove Range ( 0 , Ġit . full Message . indexOf ('\ n ')). trim () Ċ }. join ToString ("\ r \ n ") Ċ Ċ cur se forge Ġ{ ĊĠĠĠ ĠapiKey Ġ= Ġcur se _ api _ key Ġ?: Ġ"" ĊĊĠĠĠ Ġoptions ( closure Of < Options > Ġ{ ĊĠĠĠĠĠĠĠ Ġfor ge Gradle Integration Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġdebug Ġ= Ġtrue ĊĠĠĠ Ġ}) ĊĊĠĠĠ Ġproject ( closure Of < Cur se Project > Ġ{ ĊĠĠĠĠĠĠĠ Ġid Ġ= Ġproject _ cur se forge _ id ĊĠĠĠĠĠĠĠ Ġrelease Type Ġ= Ġ" release " ĊĠĠĠĠĠĠĠ Ġprintln ( changes ) ĊĠĠĠĠĠĠĠ Ġchangelog Ġ= Ġchanges ĊĠĠĠĠĠĠĠ Ġadd Game Version ( version _ mc ) Ċĉ ĉ relations ( closure Of < Cur se Relation > Ġ{ Ċĉĉ ĉ required Dependency (" fabric ") Ċĉĉ ĉ required Dependency (" fabric - language - kotlin ") Ċĉ ĉ }) ĊĠĠĠ Ġ}) Ċ } Ċ after Evaluate Ġ{ ĊĠĠĠ Ġtasks . named (" cur se forge $ project _ cur se forge _ id ") Ġ{ ĊĠĠĠĠĠĠĠ Ġdepends On ( tasks . get ByName (" remap Jar ")) ĊĠĠĠ Ġ} Ċ } Ċ Ċ configure < Github Release Extension > Ġ{ ĊĠĠĠ Ġtoken ( github _ release _ token Ġ?: Ġ"") ĊĠĠĠ Ġowner . set (" He a 3 ve N ") ĊĠĠĠ Ġrepo . set (" D ul ce De L ec he ") ĊĠĠĠ Ġtarget Commit ish . set (" master ") ĊĠĠĠ Ġbody . set ( changes ) ĊĠĠĠ Ġdraft . set ( false ) ĊĠĠĠ Ġpr erelease . set ( false ) ĊĠĠĠ Ġrelease Assets . set From ( tasks . jar . get (). outputs . files ) Ċ } Ċ tasks . named (" github Release ") Ġ{ ĊĠĠĠ Ġdepends On ( tasks . get ByName (" remap Jar ")) Ċ } ĊĊĊ