import Ġorg . jetbrains . kotlin . gradle . tasks . Kotlin Compile Ċ Ċ build script Ġ{ ĊĊĠĠĠ Ġ// ĠAdd Ġassignments Ġlike Ġbelow , Ġto Ġoverwrite Ġvalues , ĊĠĠĠ Ġ// Ġwhich Ġare Ġconfigured Ġin Ġ" versions . gradle . k ts ", Ġbut Ġonly Ġinside Ġcurrent Ġroot Ġproject Ġand Ġit 's Ġsub projects . ĊĠĠĠĠĊ ĉ // Ġhttps :// mvn repository . com / artifact / com . github . mv ys ny . k ari bud sl / k ari bu - dsl - v 1 0 ĊĠĠĠ Ġroot Project . extra [" k ari bud sl 1 0 Version "] Ġ= Ġ" 0 . 7 . 0 " ĊĉĊ ĉ // Ġhttps :// mvn repository . com / artifact / com . vaadin / vaadin - spring - boot - starter ĊĠĠĠ Ġroot Project . extra [" spring Boot Starter V aad in Version "] Ġ= Ġ" 1 4 . 0 . 1 " ĊĊ ĉ // Ġhttps :// mvn repository . com / artifact / org . springframework . boot / spring - boot ĊĠĠĠ Ġroot Project . extra [" spring _ boot Version "] Ġ= Ġ" 2 . 1 . 7 . RELEASE " ĊĊ ĉ // Ġhttps :// mvn repository . com / artifact / javax . xml . bind / jax b - api ĊĠĠĠ Ġroot Project . extra [" jax b apiVersion "] Ġ= Ġ" 2 . 3 . 1 " ĊĉĊ ĉ // Ġhttps :// mvn repository . com / artifact / com . fasterxml . jackson . module / jackson - module - kotlin ĊĠĠĠ Ġroot Project . extra [" jackson Module _ kotlin Version "] Ġ= Ġ" 2 . 9 . 9 " ĊĉĊ ĉ // Ġhttps :// mvn repository . com / artifact / ch . qos . log back / log back - classic ĊĠĠĠ Ġroot Project . extra [" log back Version "] Ġ= Ġ" 1 . 2 . 3 " ĊĉĊ ĉ // Ġhttps :// mvn repository . com / artifact / org . junit . jupiter / junit - jupiter - api ĊĠĠĠ Ġroot Project . extra [" junit 5 Version "] Ġ= Ġ" 5 . 5 . 1 " ĊĉĊ ĉ // Ġhttps :// mvn repository . com / artifact / org . am sh ove . k lu ent / k lu ent ĊĠĠĠ Ġroot Project . extra [" k lu ent _ Version "] Ġ= Ġ" 1 . 4 9 " ĊĊĠĠĠ Ġ// Ġhttps :// github . com / Jet Brains / kotlin - wrappers / tree / master / kotlin - css ĊĠĠĠ Ġ// Ġhttps :// bin tray . com / kotlin / kotlin - js - wrappers / kotlin - css ĊĠĠĠ Ġroot Project . extra [" kotlin Css Version "] Ġ= Ġ" 1 . 0 . 0 - pre . 8 2 - kotlin - 1 . 3 . 4 1 " Ċ } Ċ Ċ plugins Ġ{ ĊĊ ĉ // Ġhttps :// plugins . gradle . org / plugin / com . github . ben - man es . versions Ċ ĉ id (" com . github . ben - man es . versions ") Ġversion Ġ" 0 . 2 2 . 0 " ĊĊ ĉ // Ġhttps :// mvn repository . com / artifact / org . jetbrains . kotlin / kotlin - gradle - plugin ĊĠĠĠ Ġkotlin (" jvm ") Ġversion Ġ" 1 . 3 . 4 1 " ĊĉĊ ĉ java Ċ ĉ application ĊĉĊĠĠĠ Ġid (" org . springframework . boot ") Ġversion Ġ" 2 . 1 . 7 . RELEASE " Ċ } ĊĊ Ċ repositories Ġ{ ĊĊ ĉ j center () Ċ ĉ maven Local () Ċ ĉ maven Central () ĊĊ ĉ maven Ġ{ Ċĉ ĉ url Ġ= Ġuri (" https :// plugins . gradle . org / m 2 /") Ċ ĉ } Ċ ĉ maven Ġ{ Ċĉ ĉ url Ġ= Ġuri (" https :// kotlin . bin tray . com / kotlin - js - wrappers ") Ċ ĉ } Ċ Ċ } Ċ Ċ dependencies Ġ{ ĊĊ ĉ compile ( kotlin (" stdlib - jdk 8 ")) Ċ ĉ implementation ( kotlin (" stdlib - jdk 7 ")) Ċ ĉ implementation ( kotlin (" reflect ")) ĊĊ ĉ compile (" com . fasterxml . jackson . module : jackson - module - kotlin :${ root Project . extra [" jackson Module _ kotlin Version "] }") ĊĊ ĉ test Implementation ( kotlin (" test ")) Ċ ĉ test Implementation ( kotlin (" test - junit ")) ĊĊ ĉ implementation (" javax . xml . bind : jax b - api :${ root Project . extra [" jax b apiVersion "] }") ĊĊ ĉ compile (" ch . qos . log back : log back - classic :${ root Project . extra [" log back Version "] }") ĊĊ ĉ set Of ( Ċĉĉ ĉ " org . junit . jupiter : junit - jupiter - api " Ġto Ġ" junit 5 Version ", Ċĉĉ ĉ " org . am sh ove . k lu ent : k lu ent " Ġto Ġ" k lu ent _ Version " Ċ ĉ ). forEach Ġ{ Ċĉ ĉ test Implementation ("${ it . first }:${ root Project . extra [ it . second ]} ") Ċ ĉ } Ċ Ċ // ĉ set Of ( Ċ // ĉĉ ĉ " org . junit . jupiter : junit - jupiter - api :${ root Project . extra [" junit 5 Version "] }", Ċ // ĉĉ ĉ " org . am sh ove . k lu ent : k lu ent :${ root Project . extra [" k lu ent _ Version "] }" Ċ // ĉ ). forEach Ġ{ Ċ // ĉ ĉ test Implementation ( it ) Ċ // ĉ } Ċ Ċ // ĉ test Implementation (" org . junit . jupiter : junit - jupiter - api :${ root Project . extra [" junit 5 Version "] }") Ċ // ĉ test Implementation (" org . am sh ove . k lu ent : k lu ent :${ root Project . extra [" k lu ent _ Version "] }") ĊĊ ĉ implementation (" org . jetbrains : kotlin - css - jvm :${ root Project . extra [" kotlin Css Version "] }") ĊĊ ĉ // Ġimplementation : Ġspring Ġcore Ġspecific Ġfeatures , Ġdepend Ġon Ġspring Ġcore Ġframework ĊĠĠĠ Ġimplementation (" org . springframework . boot : spring - boot - starter :${ root Project . extra [" spring _ boot Version "] }") ĊĊĠĠĠ Ġimplementation (" com . github . mv ys ny . k ari bud sl : k ari bu - dsl - v 1 0 :${ root Project . extra [" k ari bud sl 1 0 Version "] }") Ġ{ ĊĠĠĠĠĠĠĠ Ġexclude (" javax . servlet ", Ġ" javax . servlet - api ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ// Ġimplementation : ĠV aad in Ġspecific Ġfeatures , Ġdepend Ġon Ġva adin Ġflow Ġframework ĊĠĠĠ Ġ// ĠTom cat Ġby Ġdefault ĊĠĠĠ Ġimplementation (" com . vaadin : vaadin - spring - boot - starter :${ root Project . extra [" spring Boot Starter V aad in Version "] }") Ġ{ ĊĠĠĠĠĠĠĠ Ġexclude (" javax . servlet ", Ġ" javax . servlet - api ") ĊĠĠĠ Ġ} Ċ Ċ } Ċ Ċ java Ġ{ Ċ ĉ source Compatibility Ġ= ĠJava Version . VERSION _ 1 2 Ċ ĉ target Compatibility Ġ= ĠJava Version . VERSION _ 1 2 Ċ } Ċ Ċ tasks . with Type < Kotlin Compile >(). all Ġ{ Ċ ĉ kotlin Options Ġ{ Ċĉ ĉ jvm Target Ġ= Ġ" 1 2 " Ċĉ ĉ // Ġfree Compiler Args Ġ= ĠlistOf ("- X js r 3 0 5 = strict ") Ċ ĉ } Ċ } Ċ Ċ group Ġ= Ġ" v lf soft " Ċ version Ġ= Ġ 1 . 0 Ġ// Ġ-> Ġv lf soft . module - 1 . 0 . jar Ċ Ċ val Ġapp Package Ġ= Ġ" issue 0 0 0 5 " Ċ Ċ application Ġ{ ĊĠĠĠ Ġmain ClassName Ġ= Ġ" v lf soft .$ app Package . Application Kt " Ċ } Ċ Ċ val Ġjar Ġby Ġtasks . getting ( Jar :: class ) Ġ{ ĊĠĠĠ Ġmanifest Ġ{ ĊĠĠĠĠĠĠĠ Ġattributes [" Main - Class "] Ġ= Ġapplication . main ClassName ĊĠĠĠĠĠĠĠ Ġattributes [" Automatic - Module - Name "] Ġ= Ġ" v lf soft .$ app Package . app " ĊĠĠĠ Ġ} Ċ } Ċ Ċ tasks Ġ{ ĊĊ ĉ // Ġhttps :// stackoverflow . com / questions / 3 1 4 0 5 8 1 8 / want - to - specify - jar - name - and - version - both - in - build - gradle Ċ ĉ // Ġhttps :// github . com / bar log - m / spring - boot - 2 - example - app / blob / master / build . gradle . k ts Ċ ĉ // Ġhttps :// stackoverflow . com / questions / 5 5 5 7 5 2 6 4 / creating - a - fat - jar - in - gradle - with - kot l ind sl ĊĠĠĠ Ġboot Jar Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġdefaults Ġto Ġproject . name ĊĠĠĠĠĠĠĠ Ġarchive Base Name . set (" v lf soft .$ app Package . app ") ĊĊĠĠĠĠĠĠĠ Ġ// Ġdefaults Ġto Ġall , Ġso Ġremoving Ġthis Ġoverrides Ġthe Ġnormal , Ġnon - fat Ġjar ĊĠĠĠĠĠĠĠ Ġ// Ġarchive Classifier . set ("") ĊĠĠĠ Ġ} Ċ } ĊĊĊ