package Ġcom . so y wiz . k orge . gradle . targets . android Ċ Ċ import Ġcom . so y wiz . k orge . gradle .* Ċ import Ġcom . so y wiz . k orge . gradle . targets .* Ċ import Ġcom . so y wiz . k orge . gradle . util .* Ċ import Ġorg . gradle . api . Default Task Ċ import Ġorg . gradle . api . Project Ċ import Ġorg . gradle . api . tasks . Gradle Build Ċ import Ġjava . io . File Ċ import Ġkotlin . collections . Linked HashMap Ċ import Ġkotlin . collections . component 1 Ċ import Ġkotlin . collections . component 2 Ċ import Ġkotlin . collections . iterator Ċ import Ġkotlin . collections . listOf Ċ import Ġkotlin . collections . set Ċ Ċ // Linux : Ġ~/ Android / Sdk Ċ // Mac : Ġ~/ Library / Android / sdk Ċ // Windows : Ġ% LOCAL APP DATA %\ Android \ sdk Ċ val ĠProject . android Sdk Path : ĠString Ġby Ġlazy Ġ{ Ċ ĉ val Ġuser Home Ġ= ĠSystem . getProperty (" user . home ") Ċ ĉ listOf NotNull ( Ċĉ ĉ System . getenv (" ANDROID _ HOME "), Ċĉ ĉ "$ user Home / AppData / Local / Android / sdk ", Ċĉ ĉ "$ user Home / Library / Android / sdk ", Ċĉ ĉ "$ user Home / Android / Sdk " Ċ ĉ ). first OrNull Ġ{ ĠFile ( it ). exists () Ġ} Ġ?: Ġerror (" Can 't Ġfind Ġandroid Ġsdk Ġ( ANDROID _ HOME Ġenvironment Ġnot Ġset Ġand ĠAndroid ĠSDK Ġnot Ġfound Ġin Ġstandard Ġlocations )") Ċ } Ċ Ċ fun ĠProject . configure Native Android () Ġ{ Ċ ĉ val Ġresolved Artifacts Ġ= ĠLinkedHashMap < String , ĠString >() ĊĊ ĉ configurations . all Ġ{ Ċĉ ĉ it . resolution Strategy . each Dependency Ġ{ Ċĉĉ ĉ val Ġclean FullName Ġ= Ġ"${ it . requested . group }:${ it . requested . name }". remove Suffix ("- js "). remove Suffix ("- jvm ") Ċĉĉ ĉ // println (" RESOL VE ĠAR TI FACT : Ġ${ it . requested }") Ċĉĉ ĉ // if Ġ( clean FullName . startsWith (" org . jetbrains . intellij . deps : tro ve 4 j ")) Ġreturn @ each Dependency Ċĉĉ ĉ // if Ġ( clean FullName . startsWith (" org . jetbrains : annotations ")) Ġreturn @ each Dependency Ċĉĉ ĉ if Ġ( clean FullName . startsWith (" org . jetbrains ")) Ġreturn @ each Dependency Ċĉĉ ĉ if Ġ( clean FullName . startsWith (" junit : junit ")) Ġreturn @ each Dependency Ċĉĉ ĉ if Ġ( clean FullName . startsWith (" org . hamcrest : hamcrest - core ")) Ġreturn @ each Dependency Ċĉĉ ĉ if Ġ( clean FullName . startsWith (" org . j og amp ")) Ġreturn @ each Dependency Ċĉĉ ĉ resolved Artifacts [ clean FullName ] Ġ= Ġit . requested . version . toString () Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ // val Ġandroid PackageName Ġ= Ġ" com . example . my application " Ċ ĉ // val Ġandroid AppName Ġ= Ġ" My ĠAwesome ĠAPP ĠName " Ċ ĉ val Ġprepare Android Bootstrap Ġ= Ġtasks . create (" prepare Android Bootstrap ") Ġ{ Ġtask Ġ-> Ċĉ ĉ task . depends On (" compile Test Kotlin Jvm ") Ġ// ĠSo Ġartifacts Ġare Ġresolved Ċĉ ĉ task . apply Ġ{ Ċĉĉ ĉ val Ġoverwrite Ġ= Ġtrue Ċĉĉ ĉ val Ġoutput Folder Ġ= ĠFile ( build Dir , Ġ" platforms / android ") Ċĉĉ ĉ do Last Ġ{ Ċĉĉĉ ĉ val Ġandroid PackageName Ġ= Ġk orge . id Ċĉĉĉ ĉ val Ġandroid AppName Ġ= Ġk orge . name ĊĊĉĉĉ ĉ val ĠD OL L AR Ġ= Ġ"\\ $" Ċĉĉĉ ĉ val Ġif Not Exists Ġ= Ġ! overwrite Ċĉĉĉ ĉ // File ( output Folder , Ġ" build . gradle "). condition ally ( if Not Exists ) Ġ{ Ċĉĉĉ ĉ // ĉ ensure Parents (). write Text (""" Ċĉĉĉ ĉ // ĉ ĉ // ĠTop - level Ġbuild Ġfile Ġwhere Ġyou Ġcan Ġadd Ġconfiguration Ġoptions Ġcommon Ġto Ġall Ġsub - projects / modules . Ċĉĉĉ ĉ // ĉ ĉ build script Ġ{ Ċĉĉĉ ĉ // ĉĉ ĉ repositories Ġ{ Ġgoogle (); Ġj center () Ġ} Ċĉĉĉ ĉ // ĉĉ ĉ dependencies Ġ{ Ġclasspath Ġ' com . android . tools . build : gradle : 3 . 3 . 0 '; Ġclasspath Ġ" org . jetbrains . kotlin : kotlin - gradle - plugin :$ kotlin Version " Ġ} Ċĉĉĉ ĉ // ĉ ĉ } Ċĉĉĉ ĉ // ĉ ĉ all projects Ġ{ Ċĉĉĉ ĉ // ĉĉ ĉ repositories Ġ{ Ċĉĉĉ ĉ // ĉĉĉ ĉ maven Local (); Ġmaven Ġ{ Ġurl Ġ= Ġ" https :// dl . bin tray . com / so y wiz / so y wiz " Ġ}; Ġgoogle (); Ġj center () Ċĉĉĉ ĉ // ĉĉ ĉ } Ċĉĉĉ ĉ // ĉ ĉ } Ċĉĉĉ ĉ // ĉ ĉ task Ġclean ( type : ĠDelete ) Ġ{ Ġdelete Ġroot Project . build Dir Ġ} Ċĉĉĉ ĉ // """. trim Indent ()) Ċĉĉĉ ĉ //} Ċĉĉĉ ĉ File ( output Folder , Ġ" local . properties "). condition ally ( if Not Exists ) Ġ{ Ċĉĉĉĉ ĉ ensure Parents (). write Text (" sdk . dir =${ android Sdk Path . escape () }") Ċĉĉĉ ĉ } Ċĉĉĉ ĉ File ( output Folder , Ġ" settings . gradle "). condition ally ( if Not Exists ) Ġ{ Ġensure Parents (). write Text ("") Ġ} Ċĉĉĉ ĉ File ( Ċĉĉĉĉ ĉ output Folder , Ċĉĉĉĉ ĉ " pro guard - rules . pro " Ċĉĉĉ ĉ ). condition ally ( if Not Exists ) Ġ{ Ġensure Parents (). write Text ("# Rules Ġhere \ n ") Ġ} ĊĊĉĉĉ ĉ output Folder [" gradle "]. mkdir s () Ċĉĉĉ ĉ rootDir [" gradle "]. copy Re cursively ( output Folder [" gradle "], Ġoverwrite Ġ= Ġtrue ) Ġ{ Ġf , Ġe Ġ-> ĠOn ErrorAction . SKIP Ġ} ĊĊĉĉĉ ĉ File ( output Folder , Ġ" build . gradle "). condition ally ( if Not Exists ) Ġ{ Ċĉĉĉĉ ĉ ensure Parents (). write Text ( Ind enter Ġ{ Ċĉĉĉĉĉ ĉ line (" build script ") Ġ{ Ċĉĉĉĉĉĉ ĉ line (" repositories Ġ{ Ġgoogle (); Ġj center (); Ġmaven Ġ{ Ġurl Ġ= Ġuri (\" https :// dl . bin tray . com / kotlin / kotlin - dev \") Ġ} Ġ} ") Ċĉĉĉĉĉĉ ĉ line (" dependencies Ġ{ Ġclasspath Ġ' com . android . tools . build : gradle : 3 . 3 . 0 '; Ġclasspath Ġ' org . jetbrains . kotlin : kotlin - gradle - plugin :$ kotlin Version ' Ġ} ") Ċĉĉĉĉĉ ĉ } Ċĉĉĉĉĉ ĉ line (" repositories ") Ġ{ Ċĉĉĉĉĉĉ ĉ line (" maven Local () ") Ċĉĉĉĉĉĉ ĉ line (" maven Ġ{ Ġurl Ġ= Ġ' https :// dl . bin tray . com / so y wiz / so y wiz ' Ġ} ") Ċĉĉĉĉĉĉ ĉ line (" google () ") Ċĉĉĉĉĉĉ ĉ line (" j center () ") Ċĉĉĉĉĉĉ ĉ line (" maven Ġ{ Ġurl Ġ= Ġuri (\" https :// dl . bin tray . com / kotlin / kotlin - dev \") Ġ} ") Ċĉĉĉĉĉ ĉ } ĊĊĉĉĉĉĉ ĉ line (" apply Ġplugin : Ġ' com . android . application '") Ċĉĉĉĉĉ ĉ line (" apply Ġplugin : Ġ' kotlin - android '") Ċĉĉĉĉĉ ĉ line (" apply Ġplugin : Ġ' kotlin - android - extensions '") ĊĊĉĉĉĉĉ ĉ line (" android ") Ġ{ Ċĉĉĉĉĉĉ ĉ line (" compile Sdk Version Ġ 2 8 ") Ċĉĉĉĉĉĉ ĉ line (" default Config ") Ġ{ Ċĉĉĉĉĉĉĉ ĉ line (" multi Dex Enabled Ġtrue ") Ċĉĉĉĉĉĉĉ ĉ line (" application Id Ġ'$ android PackageName '") Ċĉĉĉĉĉĉĉ ĉ line (" min Sdk Version Ġ 1 9 ") Ċĉĉĉĉĉĉĉ ĉ line (" target Sdk Version Ġ 2 8 ") Ċĉĉĉĉĉĉĉ ĉ line (" version Code Ġ 1 ") Ċĉĉĉĉĉĉĉ ĉ line (" version Name Ġ' 1 . 0 '") Ċĉĉĉĉĉĉĉ ĉ line (" test Instrumentation Runner Ġ' android . support . test . runner . Android JUnit Runner '") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmanifest Place holders Str Ġ= Ġk orge . configs . map Ġ{ Ġit . key Ġ+ Ġ":" Ġ+ Ġit . value . quoted Ġ}. join ToString (", Ġ") Ċĉĉĉĉĉĉĉ ĉ line (" manifest Place holders Ġ= Ġ${ if Ġ( manifest Place holders Str . isEmpty ()) Ġ" [: ]" Ġelse Ġ" [$ manifest Place holders Str ]" Ġ} ") Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉ ĉ line (" build Types ") Ġ{ Ċĉĉĉĉĉĉĉ ĉ line (" debug ") Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ line (" minify Enabled Ġfalse ") Ċĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉĉ ĉ line (" release ") Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ line (" minify Enabled Ġfalse ") Ċĉĉĉĉĉĉĉĉ ĉ line (" pro guard Files ĠgetDefault Pro guard File (' pro guard - android - optimize . txt '), Ġ' pro guard - rules . pro '") Ċĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉ ĉ line (" source Sets ") Ġ{ Ċĉĉĉĉĉĉĉ ĉ line (" main ") Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ // Ġ@ TODO : ĠUse Ġproper Ġsource Ġsets Ġof Ġthe Ġapp ĊĊĉĉĉĉĉĉĉĉ ĉ val Ġproject Dir Ġ= Ġproject . project Dir Ċĉĉĉĉĉĉĉĉ ĉ line (" java . src Dirs Ġ+= Ġ[ ${ "$ project Dir / src / common Main / kotlin ". quoted }, Ġ${ "$ project Dir / src / android Main / kotlin ". quoted }] ") Ċĉĉĉĉĉĉĉĉ ĉ line (" assets . src Dirs Ġ+= Ġ[ ${ "$ project Dir / src / common Main / resources ". quoted }, Ġ${ "$ project Dir / src / android Main / resources ". quoted }, Ġ${ "$ project Dir / build / gen Main Resources ". quoted }] ") Ċĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉ ĉ } ĊĊĉĉĉĉĉ ĉ line (" dependencies ") Ġ{ Ċĉĉĉĉĉĉ ĉ line (" implementation Ġfile Tree ( dir : Ġ' libs ', Ġinclude : Ġ[' *. jar ']) ") Ċĉĉĉĉĉĉ ĉ line (" implementation Ġ' org . jetbrains . kotlin : kotlin - stdlib - jdk 7 :$ kotlin Version '") Ċĉĉĉĉĉĉ ĉ line (" implementation Ġ' com . android . support : multi dex : 1 . 0 . 3 '") ĊĊĉĉĉĉĉĉ ĉ line (" api Ġ' org . jetbrains . kotlin x : kotlin x - coroutines - android :$ coroutines Version '") Ċĉĉĉĉĉĉ ĉ for Ġ(( name , Ġversion ) Ġin Ġresolved Artifacts ) Ġ{ Ċĉĉĉĉĉĉĉ ĉ if Ġ( name . startsWith (" org . jetbrains . kotlin ")) Ġcontinue Ċĉĉĉĉĉĉĉ ĉ if Ġ( name . contains ("- metadata ")) Ġcontinue Ċĉĉĉĉĉĉĉ ĉ line (" api Ġ'$ name - android :$ version '") Ċĉĉĉĉĉĉ ĉ } ĊĊĉĉĉĉĉĉ ĉ for Ġ( dependency Ġin Ġk orge . plugins . plugin Ex ts . flatMap Ġ{ Ġit . get Android Dependencies () Ġ}) Ġ{ Ċĉĉĉĉĉĉĉ ĉ line (" implementation Ġ${ dependency . quoted }") Ċĉĉĉĉĉĉ ĉ } ĊĊĉĉĉĉĉĉ ĉ line (" implementation Ġ' com . android . support : appcompat - v 7 : 2 8 . 0 . 0 '") Ċĉĉĉĉĉĉ ĉ line (" implementation Ġ' com . android . support . constraint : constraint - layout : 1 . 1 . 3 '") Ċĉĉĉĉĉĉ ĉ line (" test Implementation Ġ' junit : junit : 4 . 1 2 '") Ċĉĉĉĉĉĉ ĉ line (" android Test Implementation Ġ' com . android . support . test : runner : 1 . 0 . 2 '") Ċĉĉĉĉĉĉ ĉ line (" android Test Implementation Ġ' com . android . support . test . espress o : espress o - core : 3 . 0 . 2 '") Ċĉĉĉĉĉ ĉ } ĊĊĉĉĉĉĉ ĉ line (" configurations ") Ġ{ Ċĉĉĉĉĉĉ ĉ line (" android Test Implementation . extends From ( common Main Api )") Ċĉĉĉĉĉ ĉ } Ċĉĉĉĉ ĉ }. toString ()) Ċĉĉĉ ĉ } ĊĊĉĉĉ ĉ File ( output Folder , Ġ" src / main / res / mip map - md pi / icon . png "). condition ally ( if Not Exists ) Ġ{ Ċĉĉĉĉ ĉ ensure Parents (). write Bytes ( k orge . get Icon Bytes ()) Ċĉĉĉ ĉ } ĊĊĉĉĉ ĉ File ( output Folder , Ġ" src / main / Android Manifest . xml "). condition ally ( if Not Exists ) Ġ{ Ċĉĉĉĉ ĉ ensure Parents (). write Text ( Ind enter Ġ{ Ċĉĉĉĉĉ ĉ line (" <? xml Ġversion =\" 1 . 0 \" Ġencoding =\" utf - 8 \" ?> ") Ċĉĉĉĉĉ ĉ line ("< manifest Ġxmlns : android =\" http :// schemas . android . com / apk / res / android \" Ġpackage =\" $ android PackageName \"> ") Ċĉĉĉĉĉ ĉ indent Ġ{ Ċĉĉĉĉĉĉ ĉ line ("< application ") Ċĉĉĉĉĉĉ ĉ indent Ġ{ Ċĉĉĉĉĉĉĉ ĉ line ("") Ċĉĉĉĉĉĉĉ ĉ line (" android : allow Backup =\" true \" ") Ċĉĉĉĉĉĉĉ ĉ line (" android : label =\" $ android AppName \" ") Ċĉĉĉĉĉĉĉ ĉ line (" android : icon =\" @ mip map / icon \" ") Ċĉĉĉĉĉĉĉ ĉ // line (" android : icon =\" @ android : drawable / sym _ def _ app _ icon \" ") Ċĉĉĉĉĉĉĉ ĉ // line (" android : round Icon =\" @ android : drawable / sym _ def _ app _ icon \" ") Ċĉĉĉĉĉĉĉ ĉ line (" android : supports R tl =\" true \" ") Ċĉĉĉĉĉĉĉ ĉ line (" android : theme =\" @ android : style / Theme . Black . No Title Bar . Fullscreen \" ") Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉ ĉ line ("> ") Ċĉĉĉĉĉĉ ĉ indent Ġ{ Ċĉĉĉĉĉĉĉ ĉ for Ġ( text Ġin Ġk orge . plugins . plugin Ex ts . map NotNull Ġ{ Ġit . get Android Manifest Application () Ġ}) Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ line ( text ) Ċĉĉĉĉĉĉĉ ĉ } ĊĊĉĉĉĉĉĉĉ ĉ line ("< activity Ġandroid : name =\" . MainActivity \"> ") Ċĉĉĉĉĉĉĉ ĉ indent Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ line ("< intent - filter >") Ċĉĉĉĉĉĉĉĉ ĉ indent Ġ{ Ċĉĉĉĉĉĉĉĉĉ ĉ line ("< action Ġandroid : name =\" android . intent . action . MAIN \" /> ") Ċĉĉĉĉĉĉĉĉĉ ĉ line ("< category Ġandroid : name =\" android . intent . category . LA UNCH ER \" /> ") Ċĉĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉĉĉ ĉ line ("</ intent - filter >") Ċĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉĉ ĉ line ("</ activity >") Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉ ĉ line ("</ application >") Ċĉĉĉĉĉ ĉ } Ċĉĉĉĉĉ ĉ line ("</ manifest >") Ċĉĉĉĉ ĉ }. toString ()) Ċĉĉĉ ĉ } ĊĊĉĉĉ ĉ File ( output Folder , Ġ" src / main / java / MainActivity . kt "). condition ally ( if Not Exists ) Ġ{ Ċĉĉĉĉ ĉ ensure Parents (). write Text ( Ind enter Ġ{ Ċĉĉĉĉĉ ĉ line (" package Ġ$ android PackageName ") ĊĊĉĉĉĉĉ ĉ line (" import Ġcom . so y wiz . k lock .* ") Ċĉĉĉĉĉ ĉ line (" import Ġcom . so y wiz . k orge .* ") Ċĉĉĉĉĉ ĉ line (" import Ġcom . so y wiz . k orge . t ween .* ") Ċĉĉĉĉĉ ĉ line (" import Ġcom . so y wiz . k orge . view .* ") Ċĉĉĉĉĉ ĉ line (" import Ġcom . so y wiz . k org w .* ") Ċĉĉĉĉĉ ĉ line (" import Ġcom . so y wiz . kor im . color .* ") Ċĉĉĉĉĉ ĉ line (" import Ġcom . so y wiz . k orm a . geom .* ") Ċĉĉĉĉĉ ĉ line (" import Ġkotlinx . coroutines .* ") Ċĉĉĉĉĉ ĉ line (" import Ġ${ k orge . entry Point }") ĊĊĉĉĉĉĉ ĉ line (" class ĠMainActivity Ġ: ĠK org w Activity () ") Ġ{ Ċĉĉĉĉĉĉ ĉ line (" override Ġsuspend Ġfun Ġactivity Main () ") Ġ{ Ċĉĉĉĉĉĉĉ ĉ for Ġ( text Ġin Ġk orge . plugins . plugin Ex ts . map NotNull Ġ{ Ġit . get Android Init () Ġ}) Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ line ( text ) Ċĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉĉ ĉ line ("${ k orge . entry Point }() ") Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉ ĉ } Ċĉĉĉĉ ĉ }. toString ()) Ċĉĉĉ ĉ } ĊĊ Ċĉĉĉ ĉ File ( output Folder , Ġ" gradle . properties "). condition ally ( if Not Exists ) Ġ{ Ċĉĉĉĉ ĉ ensure Parents (). write Text (" org . gradle . jvm args =- X mx 1 5 3 6 m ") Ċĉĉĉ ĉ } Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ // Ġa db Ġshell Ġam Ġstart Ġ- n Ġcom . package . name / com . package . name . Activity Name Ċ ĉ for Ġ( debug Ġin ĠlistOf ( false , Ġtrue )) Ġ{ Ċĉ ĉ val Ġsuffix Debug Ġ= Ġif Ġ( debug ) Ġ" Debug " Ġelse Ġ" Release " Ċĉ ĉ val Ġinstall Android Task Ġ= Ġtasks . create (" install Android $ suffix Debug ", ĠGradle Build :: class . java ) Ġ{ Ġtask Ġ-> Ċĉĉ ĉ task . apply Ġ{ Ċĉĉĉ ĉ group Ġ= ĠGROUP _ K OR GE _ INSTALL Ċĉĉĉ ĉ depends On ( prepare Android Bootstrap ) Ċĉĉĉ ĉ build File Ġ= ĠFile ( build Dir , Ġ" platforms / android / build . gradle ") Ċĉĉĉ ĉ version Ġ= Ġ" 4 . 1 0 . 1 " Ċĉĉĉ ĉ tasks Ġ= ĠlistOf (" install $ suffix Debug ") Ċĉĉ ĉ } Ċĉ ĉ } ĊĊĉ ĉ for Ġ( emulator Ġin ĠlistOf ( null , Ġfalse , Ġtrue )) Ġ{ Ċĉĉ ĉ val Ġsuffix Device Ġ= Ġwhen Ġ( emulator ) Ġ{ Ċĉĉĉ ĉ null Ġ-> Ġ"" Ċĉĉĉ ĉ false Ġ-> Ġ" Device " Ċĉĉĉ ĉ true Ġ-> Ġ" Em ulator " Ċĉĉ ĉ } ĊĊĉĉ ĉ val Ġextra Ġ= Ġwhen Ġ( emulator ) Ġ{ Ċĉĉĉ ĉ null Ġ-> ĠarrayOf () Ċĉĉĉ ĉ false Ġ-> ĠarrayOf ("- d ") Ċĉĉĉ ĉ true Ġ-> ĠarrayOf ("- e ") Ċĉĉ ĉ } ĊĊĉĉ ĉ tasks . create Typed < Default Task >(" run Android $ suffix Device $ suffix Debug ") Ġ{ Ċĉĉĉ ĉ group Ġ= ĠGROUP _ K OR GE _ RUN Ċĉĉĉ ĉ depends On ( install Android Task ) Ċĉĉĉ ĉ do First Ġ{ Ċĉĉĉĉ ĉ exec Ġ{ Ċĉĉĉĉĉ ĉ it . command Line ( Ċĉĉĉĉĉĉ ĉ "$ android Sdk Path / platform - tools / adb ", Ġ* extra , Ġ" shell ", Ġ" am ", Ġ" start ", Ġ"- n ", Ċĉĉĉĉĉĉ ĉ "${ k orge . id }/${ k orge . id }. MainActivity " Ċĉĉĉĉĉ ĉ ) Ċĉĉĉĉ ĉ } Ċĉĉĉ ĉ } Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } Ċ } Ċ