plugins Ġ{ ĊĠ Ġbase ĊĠ Ġ` java - library ` ĊĠ Ġ` kotlin - dsl ` ĊĠ Ġ` maven - publish ` ĊĠ Ġid (" com . gradle . plugin - publish ") Ġversion Ġ" 0 . 1 1 . 0 " Ċ } Ċ Ċ group Ġ= Ġ" com . github . w um o " Ċ version Ġ= Ġ" 1 . 0 . 1 6 " Ċ Ċ plugin Bundle Ġ{ ĊĠ Ġwebsite Ġ= Ġ" https :// github . com / w um o / gradle - javac pp - plugin " ĊĠ Ġv cs Url Ġ= Ġ" https :// github . com / w um o / gradle - javac pp - plugin . git " ĊĠ Ġtags Ġ= ĠlistOf (" javac pp ", Ġ" kotlin ") Ċ } Ċ Ċ gradle Plugin Ġ{ ĊĠ Ġplugins Ġ{ ĊĠĠĠ Ġregister (" Java CPP Plugin ") Ġ{ ĊĠĠĠĠĠ Ġid Ġ= Ġ" com . github . w um o . javac pp " ĊĠĠĠĠĠ ĠdisplayName Ġ= Ġ" javac pp " ĊĠĠĠĠĠ Ġdescription Ġ= Ġ" simpl ified Ġjav ac pp Ġplugin " ĊĠĠĠĠĠ Ġimplementation Class Ġ= Ġ" Java CPP Plugin " ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ val Ġpublish Plugin From Env Ġby Ġtasks . creating Ġ{ ĊĠ Ġval Ġsetup Publish Env Ġby Ġtasks . creating Ġ{ ĊĠĠĠ Ġdo Last Ġ{ ĊĠĠĠĠĠ Ġval Ġkey Ġ= ĠSystem . getenv (" GRAD LE _ PUBL ISH _ KEY ") Ġ?: Ġerror (" GRAD LE _ PUBL ISH _ KEY Ġnot Ġset ") ĊĠĠĠĠĠ Ġval Ġsecret Ġ= ĠSystem . getenv (" GRAD LE _ PUBL ISH _ SECRET ") Ġ?: Ġerror (" GRAD LE _ PUBL ISH _ SECRET Ġnot Ġset ") ĊĊĠĠĠĠĠ ĠSystem . setProperty (" gradle . publish . key ", Ġkey ) ĊĠĠĠĠĠ ĠSystem . setProperty (" gradle . publish . secret ", Ġsecret ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĠ Ġdepends On ( setup Publish Env ) ĊĠ Ġdepends On ( tasks . publish Plugins . get ()) ĊĠ Ġtasks . publish Plugins . get (). must Run After ( setup Publish Env ) Ċ } Ċ Ċ repositories Ġ{ ĊĠ Ġmaven Central () Ċ } Ċ Ċ dependencies Ġ{ ĊĠ Ġimplementation (" net . ling ala . zip 4 j : zip 4 j : 2 . 6 . 0 ") Ċ } Ċ Ċ tasks Ġ{ ĊĠ Ġcompile Kotlin Ġ{ ĊĠĠĠ Ġkotlin Options . jvm Target Ġ= Ġ" 1 . 8 " ĊĠ Ġ} ĊĠ Ġcompile Test Kotlin Ġ{ ĊĠĠĠ Ġkotlin Options . jvm Target Ġ= Ġ" 1 . 8 " ĊĠ Ġ} Ċ } Ċ Ċ val Ġkotlin Sources Jar Ġby Ġtasks Ċ Ċ publishing Ġ{ ĊĠ Ġpublications Ġ{ ĊĠĠĠ Ġcreate < Maven Publication >(" maven ") Ġ{ ĊĠĠĠĠĠ Ġfrom ( components [" kotlin "]) ĊĠĠĠĠĠ Ġartifact ( kotlin Sources Jar ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } ĊĊ