import Ġcom . ad ar shr . gradle . test logger . theme . Theme Type Ċ import Ġorg . jetbrains . kotlin . gradle . tasks . Kotlin Compile Ċ import Ġorg . jfrog . gradle . plugin . art ifactory . dsl . Art ifactory Plugin Convention Ċ import Ġorg . jfrog . gradle . plugin . art ifactory . dsl . Publisher Config Ċ import Ġorg . jfrog . gradle . plugin . art ifactory . dsl . Resolver Config Ċ Ċ plugins Ġ{ ĊĠĠĠ Ġkotlin (" jvm ") Ġversion Ġ" 1 . 6 . 2 0 " ĊĠĠĠ Ġid (" org . jetbrains . kotlin . plugin . serialization ") Ġversion Ġ" 1 . 6 . 2 0 " ĊĠĠĠ Ġid (" com . jfrog . art ifactory ") Ġversion Ġ" 4 . 1 8 . 3 " ĊĠĠĠ Ġid (" maven - publish ") Ġapply Ġtrue ĊĠĠĠ Ġid (" com . github . ben - man es . versions ") Ġversion Ġ" 0 . 3 6 . 0 " ĊĠĠĠ Ġid (" jac oco ") ĊĠĠĠ Ġid (" com . ad ar shr . test - logger ") Ġversion Ġ" 2 . 1 . 1 " Ċ } Ċ Ċ description Ġ= Ġ" Implement Ġautomated Ġsemantic Ġrelease Ġfor Ġgradle , Ġmaven Ġand Ġansible Ġprojects ." Ċ Ċ val Ġk ot est Version Ġ= Ġ" 4 . 4 . 1 " Ċ val Ġj git Version Ġ= Ġ" 5 . 1 1 . 0 . 2 0 2 1 0 3 0 9 1 6 1 0 - r " Ċ val Ġmock k Version Ġ= Ġ" 1 . 1 0 . 6 " Ċ Ċ repositories Ġ{ ĊĠĠĠ Ġmaven (" https :// jfrog . el hub . cloud / art ifactory / el hub - mvn /") Ċ } Ċ Ċ dependencies Ġ{ ĊĠĠĠ Ġimplementation ( platform (" org . jetbrains . kotlin : kotlin - bom ")) ĊĠĠĠ Ġimplementation (" org . jetbrains . kotlin : kotlin - stdlib - jdk 8 ") ĊĠĠĠ Ġimplementation (" org . jetbrains . kotlin x : kotlin x - serialization - json : 1 . 3 . 3 ") ĊĠĠĠ Ġimplementation (" org . eclipse . j git : org . eclipse . j git :$ j git Version ") ĊĠĠĠ Ġimplementation (" org . eclipse . j git : org . eclipse . j git . ssh . js ch :$ j git Version ") ĊĠĠĠ Ġimplementation (" info . pic oc li : pic oc li : 4 . 6 . 1 ") ĊĠĠĠ Ġimplementation (" org . slf 4 j : slf 4 j - api : 1 . 7 . 3 0 ") ĊĠĠĠ Ġimplementation (" org . slf 4 j : slf 4 j - simple : 1 . 7 . 3 0 ") ĊĠĠĠ Ġimplementation (" io . github . ser pro 6 9 : semver . kt - release : 0 . 4 . 3 ") ĊĠĠĠ Ġtest Implementation (" commons - io : commons - io : 2 . 8 . 0 ") ĊĠĠĠ Ġtest Implementation (" io . kot est : kot est - runner - junit 5 :$ kot est Version ") ĊĠĠĠ Ġtest Implementation (" io . mock k : mock k :$ mock k Version ") Ċ } Ċ Ċ java Ġ{ ĊĠĠĠ Ġsource Compatibility Ġ= ĠJava Version . VERSION _ 1 _ 8 ĊĠĠĠ Ġtarget Compatibility Ġ= ĠJava Version . VERSION _ 1 _ 8 Ċ } Ċ Ċ tasks . with Type < Kotlin Compile > Ġ{ ĊĠĠĠ Ġkotlin Options Ġ{ ĊĠĠĠĠĠĠĠ Ġj vm Target Ġ= Ġ" 1 . 8 " ĊĠĠĠĠĠĠĠ Ġjava Parameters Ġ= Ġtrue ĊĠĠĠ Ġ} Ċ } Ċ Ċ tasks . with Type < Test > Ġ{ ĊĠĠĠ Ġuse JUnit Platform () ĊĠĠĠ Ġtest Logging Ġ{ ĊĠĠĠĠĠĠĠ Ġevents (" passed ", Ġ" skipped ", Ġ" failed ") ĊĠĠĠĠĠĠĠ Ġshow Standard Streams Ġ= Ġtrue ĊĠĠĠ Ġ} Ċ } Ċ Ċ jac oco Ġ{ ĊĠĠĠ Ġtool Version Ġ= Ġ" 0 . 8 . 7 " Ġ// ĠHas Ġto Ġbe Ġthe Ġsame Ġas ĠTeam City Ċ } Ċ Ċ tasks . test Ġ{ ĊĠĠĠ Ġfinal ized By ( tasks . jac oco Test Report ) Ġ// Ġreport Ġis Ġalways Ġgenerated Ġafter Ġtests Ġrun Ċ } Ċ Ċ tasks . jac oco Test Report Ġ{ ĊĠĠĠ Ġdepends On ( tasks . test ) Ġ// Ġtests Ġare Ġrequired Ġto Ġrun Ġbefore Ġgenerating Ġthe Ġreport Ċ } Ċ Ċ test logger Ġ{ ĊĠĠĠ Ġtheme Ġ= ĠTheme Type . MO CHA Ċ } ĊĊ Ċ val Ġmain ClassName Ġ= Ġ" no . el hub . tools . autore lease . Auto Release Kt " Ċ Ċ val Ġfat Jar Ġ= Ġtask (" fat Jar ", Ġtype Ġ= ĠJar :: class ) Ġ{ ĊĠĠĠ Ġarchive Base Name . set ( root Project . name ) ĊĠĠĠ Ġmanifest Ġ{ ĊĠĠĠĠĠĠĠ Ġattributes [" Implementation - Title "] Ġ= Ġroot Project . name ĊĠĠĠĠĠĠĠ Ġattributes [" Implementation - Version "] Ġ= Ġroot Project . version ĊĠĠĠĠĠĠĠ Ġattributes [" Main - Class "] Ġ= Ġmain ClassName ĊĠĠĠ Ġ} ĊĠĠĠ Ġfrom ( configurations . runtime Classpath . get (). map Ġ{ Ġif Ġ( it . isDirectory ) Ġit Ġelse Ġzip Tree ( it ) Ġ}) ĊĠĠĠ Ġexclude (" META - INF /*. SF ", Ġ" META - INF /*. D SA ", Ġ" META - INF /*. RSA ", Ġ"*. html ") ĊĠĠĠ Ġduplicates Strategy Ġ= ĠD uplicates Strategy . INCLUDE ĊĠĠĠ Ġwith ( tasks . jar . get () Ġas ĠCopy Spec ) ĊĠĠĠ Ġmust Run After ( tasks [" jar "]) Ċ } Ċ Ċ tasks [" assemble "]. depends On ( tasks [" fat Jar "]) Ċ Ċ val Ġmaven Pub Name Ġ= Ġ" maven Java Library " Ċ Ċ publishing Ġ{ ĊĠĠĠ Ġpublications Ġ{ ĊĠĠĠĠĠĠĠ Ġcreate < Maven Publication >( maven Pub Name ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfrom ( components [" java "]) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun ĠProject . art ifactory ( configure : ĠArt ifactory Plugin Convention . () Ġ-> ĠUnit ): ĠUnit Ġ= ĊĠĠĠ Ġconfigure ( project . convention . get Plugin ByName (" art ifactory ")) Ċ Ċ art ifactory Ġ{ ĊĠĠĠ Ġset Context Url (" https :// jfrog . el hub . cloud / art ifactory ") ĊĠĠĠ Ġpublish ( delegate Closure Of < Publisher Config > Ġ{ ĊĠĠĠĠĠĠĠ Ġrepository ( delegate Closure Of < groovy . lang . Gro ovy Object > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Property (" repo Key ", Ġproject . find Property (" art ifactory Repository ") Ġ?: Ġ" el hub - mvn - dev - local ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Property (" username ", Ġproject . find Property (" art ifactory Username ") Ġ?: Ġ" no user ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Property (" password ", Ġproject . find Property (" art ifactory Password ") Ġ?: Ġ" nop ass ") ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠ Ġdefaults ( delegate Closure Of < groovy . lang . Gro ovy Object > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinvoke Method (" publications ", Ġmaven Pub Name ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Property (" publish Artifacts ", Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Property (" publish P om ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ}) ĊĠĠĠ Ġresolve ( delegate Closure Of < Resolver Config > Ġ{ ĊĠĠĠĠĠĠĠ Ġset Property (" repo Key ", Ġ" repo ") ĊĠĠĠ Ġ}) Ċ } Ċ Ċ tasks [" art ifactory Publish "]. depends On ( tasks [" assemble "]) Ċ Ċ tasks [" publish "]. depends On ( tasks [" art ifactory Publish "]) Ċ