plugins Ġ{ Ċ ĉ java Ċ ĉ ` maven - publish ` Ċ ĉ id (" fabric - loom ") Ġversion Ġ" 0 . 1 1 - SNAPSHOT " Ċ ĉ id (" org . cad ix dev . lic en ser ") Ġversion Ġ" 0 . 6 . 1 " Ċ } Ċ Ċ val Ġm inecraft Version : ĠString Ġby Ġproject Ċ val Ġarch ives Base Name : ĠString Ġ= Ġproject . properties [" archives Base Name "]. toString () Ġ+ Ġm inecraft Version Ċ val Ġyarn Mappings : ĠString Ġby Ġproject Ċ val Ġloader Version : ĠString Ġby Ġproject Ċ val Ġfabric Version : ĠString Ġby Ġproject Ċ val Ġmod menu Version : ĠString Ġby Ġproject Ċ val Ġclo th Config Version : ĠString Ġby Ġproject Ċ val Ġs odium Compatibility : ĠBoolean Ġ= Ġproject . properties [" s odium Compatibility "]. toString (). to Boolean () Ċ val Ġcustom S odium Jar : ĠBoolean Ġ= Ġproject . properties [" custom S odium Jar "]. toString (). to Boolean () Ċ val Ġs odium Version : ĠString Ġby Ġproject Ċ val Ġir is Compatibility : ĠBoolean Ġ= Ġproject . properties [" iris Compatibility "]. toString (). to Boolean () Ċ val Ġcustom I ris Jar : ĠBoolean Ġ= Ġproject . properties [" custom S odium Jar "]. toString (). to Boolean () Ċ val Ġir is Version : ĠString Ġby Ġproject Ċ Ċ repositories Ġ{ Ċ ĉ maven Central () Ċ ĉ maven (" https :// maven . s hed an iel . me /") Ċ ĉ maven (" https :// maven . terraform ers mc . com / releases ") Ċ ĉ maven (" https :// api . mod rin th . com / maven ") Ġ{ Ċĉ ĉ content Ġ{ Ċĉĉ ĉ include Group (" maven . mod rin th ") Ċĉ ĉ } Ċ ĉ } Ċ } Ċ Ċ dependencies Ġ{ Ċ ĉ minecraft (" com . moj ang : minecraft :$ minecraft Version ") Ċ ĉ mappings (" net . fabric mc : yarn :$ yarn Mappings : v 2 ") Ċ ĉ mod Implementation (" net . fabric mc : fabric - loader :$ loader Version ") Ċ ĉ listOf ( Ċĉ ĉ " fabric - key - binding - api - v 1 ", Ċĉ ĉ " fabric - lifecycle - events - v 1 ", Ċĉ ĉ " fabric - networking - api - v 1 " Ċ ĉ ). forEach Ġ{ Ċĉ ĉ mod Implementation ( fabric Api . module ( it , Ġfabric Version )) ?. let Ġ{ Ġit 1 Ġ-> Ġinclude ( it 1 ) Ġ} Ċ ĉ } ĊĊ ĉ var Ġadd Fabric API Ġ= Ġfalse Ċ ĉ if Ġ( s odium Compatibility ) Ġ{ Ċĉ ĉ add Fabric API Ġ= Ġtrue Ċĉ ĉ if Ġ( custom S odium Jar ) Ġ{ Ċĉĉ ĉ mod Implementation ( files (" custom _ j ars / s odium - fabric -$ s odium Version . jar ")) Ċĉ ĉ } Ġelse Ġ{ Ċĉĉ ĉ mod Implementation (" maven . mod rin th : s odium :$ s odium Version ") Ċĉ ĉ } Ċĉ ĉ implementation (" org . j om l : j om l : 1 . 1 0 . 2 ") Ċ ĉ } Ċ ĉ if Ġ( iris Compatibility ) Ġ{ Ċĉ ĉ add Fabric API Ġ= Ġtrue Ċĉ ĉ if Ġ( custom I ris Jar ) Ġ{ Ċĉĉ ĉ mod Implementation ( files (" custom _ j ars / iris -$ iris Version . jar ")) Ċĉ ĉ } Ġelse Ġ{ Ċĉĉ ĉ mod Implementation (" maven . mod rin th : iris :$ iris Version ") Ċĉ ĉ } Ċĉ ĉ implementation (" org . an ar res : j cpp : 1 . 4 . 1 4 ") Ċ ĉ } Ċ ĉ mod Implementation (" com . terraform ers mc : mod menu :$ mod menu Version ") Ċ ĉ include ( mod Implementation (" me . s hed an iel . clo th : clo th - config - fabric :$ clo th Config Version ") Ġ{ Ċĉ ĉ exclude ( group Ġ= Ġ" net . fabric mc . fabric - api ") Ċ ĉ }) ĊĊ ĉ if Ġ( add Fabric API ) Ġ{ Ċĉ ĉ mod Runtime Only (" net . fabric mc . fabric - api : fabric - api :$ fabric Version ") Ċ ĉ } ĊĊ ĉ compile Only (" org . project lo mbok : lo mbok : 1 . 1 8 . 2 2 ") Ċ ĉ annotation Processor (" org . project lo mbok : lo mbok : 1 . 1 8 . 2 2 ") Ċ } Ċ Ċ loom Ġ{ Ċ ĉ run Configs . configure Each Ġ{ Ċĉ ĉ vm Args ("- X mx 4 G ", Ġ"- Dj ed t . game test = true ") Ċ ĉ } Ċ } Ċ Ċ java Ġ{ Ċ ĉ toolchain Ġ{ Ċĉ ĉ language Version . set ( Java Language Version . of ( 1 7 )) Ċ ĉ } Ċ } Ċ Ċ license Ġ{ Ċ ĉ include (" **/ io / s app h ire mc / chromium /** ") ĊĊ ĉ header ( project . file (" HEADER ")) Ċ ĉ new Line ( false ) Ċ } Ċ Ċ publishing Ġ{ Ċ ĉ publications . create < Maven Publication >(" maven ") Ġ{ Ċĉ ĉ from ( components [" java "]) Ċ ĉ } ĊĊ ĉ repositories Ġ{ Ċĉ ĉ maven Ġ{ Ċĉĉ ĉ name Ġ= Ġ" S app h ire MC " Ċĉĉ ĉ url Ġ= Ġuri (" http :// repo . den ary world . ru / snapshots ") Ċĉĉ ĉ is Allow In secure Protocol Ġ= Ġtrue Ċĉĉ ĉ credentials ( Password Credentials :: class ) Ċĉ ĉ } Ċ ĉ } Ċ } Ċ Ċ source Sets Ġ{ Ċ ĉ if Ġ( s odium Compatibility ) Ġ{ Ċĉ ĉ create (" s odium Compatibility ") Ġ{ Ċĉĉ ĉ java Ġ{ Ċĉĉĉ ĉ compile Classpath Ġ+= Ġmain . get (). compile Classpath Ċĉĉĉ ĉ compile Classpath Ġ+= Ġmain . get (). output Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } Ċ ĉ if Ġ( iris Compatibility ) Ġ{ Ċĉ ĉ create (" iris Compatibility ") Ġ{ Ċĉĉ ĉ java Ġ{ Ċĉĉĉ ĉ compile Classpath Ġ+= Ġmain . get (). compile Classpath Ċĉĉĉ ĉ compile Classpath Ġ+= Ġmain . get (). output Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ main Ġ{ Ċĉ ĉ java Ġ{ Ċĉĉ ĉ if Ġ( s odium Compatibility ) Ġ{ Ċĉĉĉ ĉ runtime Classpath Ġ+= Ġget ByName (" s odium Compatibility "). output Ċĉĉ ĉ } Ċĉĉ ĉ if Ġ( iris Compatibility ) Ġ{ Ċĉĉĉ ĉ runtime Classpath Ġ+= Ġget ByName (" iris Compatibility "). output Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } Ċ } Ċ Ċ tasks Ġ{ Ċ ĉ with Type < Java Compile > Ġ{ Ċĉ ĉ options . encoding Ġ= ĠChar sets . UTF _ 8 . name () Ċĉ ĉ options . release . set ( 1 7 ) Ċ ĉ } ĊĊ ĉ with Type < Javadoc > Ġ{ Ċĉ ĉ options . encoding Ġ= ĠChar sets . UTF _ 8 . name () Ċ ĉ } ĊĊ ĉ with Type < Process Resources > Ġ{ Ċĉ ĉ filtering Charset Ġ= ĠChar sets . UTF _ 8 . name () Ċ ĉ } ĊĊ ĉ with Type < Jar > Ġ{ Ċĉ ĉ archive Base Name . set ( archives Base Name ) Ċ ĉ } ĊĊ ĉ process Resources Ġ{ Ċĉ ĉ inputs . property (" version ", Ġproject . version ) ĊĊĉ ĉ files Matching (" fabric . mod . json ") Ġ{ Ċĉĉ ĉ expand (" version " Ġto Ġproject . version ) ĊĊĉĉ ĉ if Ġ(! s odium Compatibility ) Ġ{ Ċĉĉĉ ĉ filter Ġ{ Ċĉĉĉĉ ĉ it . replace (" mixins . chromium . compat . s odium . json ", Ġ" mixins . empty . s odium . json ") Ċĉĉĉ ĉ } Ċĉĉ ĉ } Ċĉĉ ĉ if Ġ(! iris Compatibility ) Ġ{ Ċĉĉĉ ĉ filter Ġ{ Ċĉĉĉĉ ĉ it . replace (" mixins . chromium . compat . iris . json ", Ġ" mixins . empty . iris . json ") Ċĉĉĉ ĉ } Ċĉĉ ĉ } Ċĉ ĉ } ĊĊĉ ĉ if Ġ( s odium Compatibility ) Ġ{ Ċĉĉ ĉ exclude (" mixins . empty . s odium . json ") Ċĉ ĉ } Ċĉ ĉ if Ġ( iris Compatibility ) Ġ{ Ċĉĉ ĉ exclude (" mixins . empty . iris . json ") Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ jar Ġ{ Ċĉ ĉ from (" LICENSE ") ĊĊĉ ĉ if Ġ( s odium Compatibility ) Ġ{ Ċĉĉ ĉ from ( source Sets [" s odium Compatibility "]. output ) Ġ{ Ċĉĉĉ ĉ files Matching ("* ref map . json ") Ġ{ Ċĉĉĉĉ ĉ name Ġ= Ġ" chromium - s odium - compat - ref map . json " Ċĉĉĉ ĉ } Ċĉĉ ĉ } Ċĉ ĉ } Ċĉ ĉ if Ġ( iris Compatibility ) Ġ{ Ċĉĉ ĉ from ( source Sets [" iris Compatibility "]. output ) Ġ{ Ċĉĉĉ ĉ files Matching ("* ref map . json ") Ġ{ Ċĉĉĉĉ ĉ name Ġ= Ġ" chromium - iris - compat - ref map . json " Ċĉĉĉ ĉ } Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ remap Jar Ġ{ Ċĉ ĉ archive Base Name . set ( archives Base Name ) Ċ ĉ } ĊĊ ĉ run Client Ġ{ Ċĉ ĉ jvm Args ?. add ("- D mixin . debug . export = true ") Ċ ĉ } Ċ }