import Ġorg . jetbrains . kotlin . config . Kotlin Compiler Version Ċ Ċ apply ( plugin Ġ= Ġ" com . android . application ") Ċ Ċ plugins Ġ{ ĊĠĠĠ Ġid (" kotlin - android ") ĊĠĠĠ Ġid (" kotlin - android - extensions ") ĊĠĠĠ Ġid (" kotlin - k apt ") Ċ } Ċ apply Ġfrom Ġ= Ġ"../ version ing . gradle " Ċ Ċ ext Ġ{ ĊĠĠĠ ĠVERSION _ NAME Ġ= Ġ" 5 . 3 . 1 " ĊĠĠĠ ĠUSE _ OR CHE STR ATOR Ġ= Ġproject . has Property (" orche strator ") Ġ? Ġproject . property (" orche strator ") Ġ: Ġfalse Ċ } Ċ Ċ android Ġ{ ĊĠĠĠ Ġcompile Sdk Version ( 2 7 ) ĊĠĠĠ Ġdefault Config Ġ{ ĊĠĠĠĠĠĠĠ Ġapplication Id Ġ= Ġ" com . duck duck go . mobile . android " ĊĠĠĠĠĠĠĠ Ġmin Sdk Version ( 2 1 ) ĊĠĠĠĠĠĠĠ Ġtarget Sdk Version ( 2 7 ) ĊĠĠĠĠĠĠĠ Ġversion Code Ġ= Ġbuild Version Code () ĊĠĠĠĠĠĠĠ Ġversion Name Ġ= ĠVERSION _ NAME ĊĠĠĠĠĠĠĠ Ġtest Instrumentation Runner Ġ= Ġ" com . duck duck go . app . TestRunner " ĊĠĠĠĠĠĠĠ Ġarch ives Base Name Ġ= Ġ" duck duck go -$ version Name " Ġ= Ġversion Name " ĊĊĠĠĠĠĠĠĠ Ġjava Compile Options Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġannotation Processor Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġarguments Ġ= Ġmap Of (" room . schema Location " Ġto Ġ"$ project Dir / schemas ". toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsource Sets Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġandroid Test . assets . src Dirs Ġ+= Ġfiles ("$ project Dir / schemas ". toString ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġsigning Configs Ġ{ ĊĠĠĠĠĠĠĠ Ġrelease ĊĠĠĠ Ġ} ĊĠĠĠ Ġbuild Types Ġ{ ĊĠĠĠĠĠĠĠ Ġnamed (" debug "){ ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġnamed (" release "){ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis Min ify Enabled Ġ= Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Pro guard Files ( listOf ( getDefault Pro guard File (" pro guard - android . txt "), Ġ" pro guard - rules . pro ")) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsigning Config Ġ= Ġsigning Configs . get ByName (" release ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġexternal Native Build Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcmake Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpath Ġ" CMake Lists . txt " ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġlint Options Ġ{ ĊĠĠĠĠĠĠĠ Ġis Abort OnError Ġ= Ġfalse ĊĠĠĠ Ġ} ĊĠĠĠ Ġtest Options Ġ{ ĊĠĠĠĠĠĠĠ Ġunit Tests . return Default Values Ġ= Ġtrue ĊĊĠĠĠĠĠĠĠ Ġif Ġ( USE _ OR CHE STR ATOR ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġexecution Ġ" ANDROID _ TEST _ OR CHE STR ATOR " ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġstatic ConfigPath Ġ= Ġ"${ System . getenv (" HOME ") }/ jenkins _ static / com . duck duck go . mobile . android " ĊĠĠĠ Ġval Ġproperties Path Ġ= Ġ"${ static ConfigPath }/ dd g _ android _ build . properties " ĊĠĠĠ Ġval Ġproperties File Ġ= Ġnew ĠFile ( properties Path ) ĊĠĠĠ Ġif Ġ( properties File . exists ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġprintln Ġ" Signing Ġproperties Ġfound " ĊĠĠĠĠĠĠĠ Ġval Ġprops Ġ= Ġnew ĠProperties () ĊĠĠĠĠĠĠĠ Ġprops . load ( new ĠFileInputStream ( properties File )) ĊĠĠĠĠĠĠĠ Ġandroid . signing Configs . release . store File Ġ= Ġfile ("${ static ConfigPath }/${ props listOf (" key . store ") }") ĊĠĠĠĠĠĠĠ Ġandroid . signing Configs . release . store Password Ġ= Ġprops listOf (" key . store . password ") ĊĠĠĠĠĠĠĠ Ġandroid . signing Configs . release . key Alias Ġ= Ġprops listOf (" key . alias ") ĊĠĠĠĠĠĠĠ Ġandroid . signing Configs . release . key Password Ġ= Ġprops listOf (" key . alias . password ") ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġprintln Ġ" Signing Ġproperties Ġnot Ġfound Ġat Ġ${ properties Path }, Ġreleases Ġwill ĠNOT Ġsucceed " ĊĠĠĠĠĠĠĠ Ġandroid . build Types . release . signing Config Ġ= Ġnull ĊĠĠĠ Ġ} Ċ } Ċ Ċ ext Ġ{ ĊĠĠĠ Ġsupport Library Ġ= Ġ" 2 7 . 1 . 1 " ĊĠĠĠ Ġarchitecture Components Ġ= Ġ" 1 . 0 . 0 " ĊĠĠĠ Ġarchitecture Components Extensions Ġ= Ġ" 1 . 1 . 1 " ĊĠĠĠ Ġandroid K tx Ġ= Ġ" 0 . 3 " ĊĠĠĠ Ġdagger Ġ= Ġ" 2 . 1 4 . 1 " ĊĠĠĠ Ġretrofit Ġ= Ġ" 2 . 3 . 0 " ĊĠĠĠ Ġan ko Version Ġ= Ġ" 0 . 1 0 . 4 " ĊĠĠĠ Ġg lide Ġ= Ġ" 4 . 6 . 1 " ĊĠĠĠ Ġandroid TestRunner Ġ= Ġ" 1 . 0 . 2 " Ċ } ĊĊ Ċ dependencies Ġ{ ĊĠĠĠ Ġdebug Implementation (" com . squareup . leak can ary : leak can ary - android : 1 . 5 . 4 ") ĊĠĠĠ Ġrelease Implementation Ġ" com . squareup . leak can ary : leak can ary - android - no - op : 1 . 5 . 4 " ĊĊĠĠĠ Ġimplementation ( file Tree ( dir Ġ= Ġ" libs ", Ġinclude : ĠlistOf (" *. jar "))) ĊĠĠĠ Ġimplementation ( kotlin (" stdlib ", ĠKotlin Compiler Version . VERSION )) ĊĠĠĠ Ġimplementation (" com . android . support : appcompat - v 7 :$ support Library ") ĊĠĠĠ Ġimplementation (" com . android . support : design :$ support Library ") ĊĠĠĠ Ġimplementation (" com . android . support . constraint : constraint - layout : 1 . 1 . 0 ") ĊĠĠĠ Ġimplementation (" com . squareup . okhttp 3 : okhttp : 3 . 1 0 . 0 ") ĊĠĠĠ Ġimplementation (" com . squareup . ret rofit 2 : ret rofit :$ ret rofit ") ĊĠĠĠ Ġimplementation (" com . squareup . ret rofit 2 : converter - mos hi :$ ret rofit ") ĊĠĠĠ Ġimplementation (" com . squareup . ret rofit 2 : adapter - rx java 2 :$ ret rofit ") ĊĠĠĠ Ġimplementation (" io . reactivex . rx java 2 : rx java : 2 . 1 . 1 0 ") ĊĠĠĠ Ġimplementation (" io . reactivex . rx java 2 : rx android : 2 . 0 . 2 ") ĊĠĠĠ Ġimplementation (" com . jak ew h art on . tim ber : tim ber : 4 . 6 . 1 ") ĊĠĠĠ Ġimplementation (" com . google . d agger : d agger - android :$ d agger ") ĊĠĠĠ Ġimplementation (" com . google . d agger : d agger - android - support :$ d agger ") ĊĠĠĠ Ġrelease Implementation Ġ" com . fa endir : ac ra : 4 . 1 0 . 0 " ĊĊĠĠĠ Ġ// ĠRx Relay ĊĠĠĠ Ġimplementation (" com . jak ew h art on . rx relay 2 : rx relay : 2 . 0 . 0 ") ĊĊĠĠĠ Ġ// ĠAn ko ĊĠĠĠ Ġimplementation (" org . jetbrains . ank o : ank o - commons :$ ank o Version ") ĊĠĠĠ Ġimplementation (" org . jetbrains . ank o : ank o - design :$ ank o Version ") ĊĊĠĠĠ Ġ// ĠAndroid ĠK TX ĊĠĠĠ Ġimplementation (" android x . core : core - k tx :$ android K tx ") ĊĊĠĠĠ Ġ// ĠViewModel Ġand ĠLive Data ĊĠĠĠ Ġimplementation (" android . arch . lifecycle : extensions :$ architecture Components Extensions ") ĊĠĠĠ Ġk apt (" android . arch . lifecycle : compiler :$ architecture Components ") ĊĠĠĠ Ġtest Implementation (" android . arch . core : core - testing :$ architecture Components ") ĊĠĠĠ Ġandroid Test Implementation (" android . arch . core : core - testing :$ architecture Components ") ĊĊĠĠĠ Ġ// ĠRoom ĊĠĠĠ Ġimplementation (" android . arch . persistence . room : runtime :$ architecture Components ") ĊĠĠĠ Ġk apt (" android . arch . persistence . room : compiler :$ architecture Components ") ĊĠĠĠ Ġtest Implementation (" android . arch . persistence . room : testing :$ architecture Components ") ĊĠĠĠ Ġandroid Test Implementation (" android . arch . persistence . room : testing :$ architecture Components ") ĊĊĠĠĠ Ġ// ĠD agger ĊĠĠĠ Ġk apt (" com . google . d agger : d agger - android - processor :$ d agger ") ĊĠĠĠ Ġk apt (" com . google . d agger : d agger - compiler :$ d agger ") ĊĠĠĠ Ġk apt ( Android Test Ġ" com . google . d agger : d agger - android - processor :$ d agger ") ĊĠĠĠ Ġk apt ( Android Test Ġ" com . google . d agger : d agger - compiler :$ d agger ") ĊĊĠĠĠ Ġ// ĠG lide ĊĠĠĠ Ġimplementation (" com . github . bump tech . glide : glide :$ glide ") ĊĠĠĠ Ġk apt (" com . github . bump tech . glide : compiler :$ glide ") ĊĊĠĠĠ Ġtest Implementation (" org . mockito : mockito - core : 2 . 1 5 . 0 ") ĊĠĠĠ Ġtest Implementation (" com . n ha ar man : mockito - kotlin - kt 1 . 1 : 1 . 5 . 0 ") ĊĠĠĠ Ġtest Implementation (" junit : junit : 4 . 1 2 ") ĊĊĠĠĠ Ġandroid Test Implementation (" com . android . support . test : runner :$ android TestRunner ") ĊĠĠĠ Ġandroid Test Implementation (" com . android . support . test : rules :$ android TestRunner ") ĊĠĠĠ Ġandroid TestUtil Ġ" com . android . support . test : orche strator : 1 . 0 . 2 " ĊĠĠĠ Ġandroid Test Implementation (" com . android . support . test . espress o : espress o - core : 3 . 0 . 2 ") ĊĠĠĠ Ġandroid Test Implementation (" org . mockito : mockito - android : 2 . 1 5 . 0 ") ĊĠĠĠ Ġandroid Test Implementation (" com . n ha ar man : mockito - kotlin - kt 1 . 1 : 1 . 5 . 0 ") Ċ Ċ } Ċ