/* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 2 0 ĠThe ĠAndroid ĠOpen ĠSource ĠProject Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġcom . android . tools . idea . wizard . template . impl . other . autom otive Messaging Service Ċ Ċ import Ġcom . android . tools . idea . wizard . template . Language Ċ import Ġcom . android . tools . idea . wizard . template . Module Template Data Ċ import Ġcom . android . tools . idea . wizard . template . Recipe Executor Ċ import Ġcom . android . tools . idea . wizard . template . impl . activities . common . addAll Kotlin Dependencies Ċ import Ġcom . android . tools . idea . wizard . template . impl . other . autom otive Messaging Service . res . xml . autom otive App Desc Xml Ċ import Ġcom . android . tools . idea . wizard . template . impl . other . autom otive Messaging Service . src . app _ package . message Read Receiver Java Ċ import Ġcom . android . tools . idea . wizard . template . impl . other . autom otive Messaging Service . src . app _ package . message Read Receiver Kt Ċ import Ġcom . android . tools . idea . wizard . template . impl . other . autom otive Messaging Service . src . app _ package . message Reply Receiver Java Ċ import Ġcom . android . tools . idea . wizard . template . impl . other . autom otive Messaging Service . src . app _ package . message Reply Receiver Kt Ċ import Ġcom . android . tools . idea . wizard . template . impl . other . autom otive Messaging Service . src . app _ package . messaging Service Java Ċ import Ġcom . android . tools . idea . wizard . template . impl . other . autom otive Messaging Service . src . app _ package . messaging Service Kt Ċ Ċ fun ĠRecipe Executor . autom otive Messaging Service Recipe ( ĊĠ Ġmodule Data : ĠModule Template Data , ĊĠ ĠserviceName : ĠString , ĊĠ Ġread Receiver Name : ĠString , ĊĠ Ġreply Receiver Name : ĠString , ĊĠ ĠpackageName : ĠString Ċ ) Ġ{ ĊĠ Ġval Ġ( project Data , Ġsrc Out , Ġres Out , Ġmanifest Out ) Ġ= Ġmodule Data ĊĠ Ġval Ġuse Android X Ġ= Ġmodule Data . project Template Data . android X Support ĊĠ Ġval Ġkt Or Java Ext Ġ= Ġproject Data . language . extension ĊĠ Ġadd All Kotlin Dependencies ( module Data ) ĊĊĠ Ġadd Dependency (" com . android . support : support - v 4 :+ ") ĊĠ Ġadd Dependency (" com . android . support : support - v 1 3 :+ ") ĊĠ Ġmerge Xml ( android Manifest Xml ( packageName , Ġread Receiver Name , Ġreply Receiver Name , ĠserviceName ), Ġmanifest Out . resolve (" Android Manifest . xml ")) ĊĠ Ġmerge Xml ( autom otive App Desc Xml (), Ġres Out . resolve (" xml / autom otive _ app _ desc . xml ")) ĊĊĠ Ġval Ġmessaging Service Ġ= Ġwhen Ġ( project Data . language ) Ġ{ ĊĠĠĠ ĠLanguage . Java Ġ-> Ġmessaging Service Java ( packageName , ĠserviceName , Ġuse Android X ) ĊĠĠĠ ĠLanguage . Kotlin Ġ-> Ġmessaging Service Kt ( packageName , ĠserviceName , Ġuse Android X ) ĊĠ Ġ} ĊĠ Ġsave ( messaging Service , Ġsrc Out . resolve ("${ serviceName }.${ kt Or Java Ext } ")) ĊĊĠ Ġval Ġmessage Read Receiver Ġ= Ġwhen Ġ( project Data . language ) Ġ{ ĊĠĠĠ ĠLanguage . Java Ġ-> Ġmessage Read Receiver Java ( packageName , Ġread Receiver Name , ĠserviceName , Ġuse Android X ) ĊĠĠĠ ĠLanguage . Kotlin Ġ-> Ġmessage Read Receiver Kt ( packageName , Ġread Receiver Name , Ġuse Android X ) ĊĠ Ġ} ĊĠ Ġsave ( message Read Receiver , Ġsrc Out . resolve ("${ read Receiver Name }.${ kt Or Java Ext } ")) ĊĊĠ Ġval Ġmessage Reply Receiver Ġ= Ġwhen Ġ( project Data . language ) Ġ{ ĊĠĠĠ ĠLanguage . Java Ġ-> Ġmessage Reply Receiver Java ( packageName , Ġreply Receiver Name , ĠserviceName , Ġuse Android X ) ĊĠĠĠ ĠLanguage . Kotlin Ġ-> Ġmessage Reply Receiver Kt ( packageName , Ġreply Receiver Name , Ġuse Android X ) ĊĠ Ġ} ĊĠ Ġsave ( message Reply Receiver , Ġsrc Out . resolve ("${ reply Receiver Name }.${ kt Or Java Ext } ")) ĊĊĠ Ġopen ( src Out . resolve ("${ serviceName }.${ kt Or Java Ext } ")) ĊĠ Ġopen ( src Out . resolve ("${ read Receiver Name }.${ kt Or Java Ext } ")) ĊĠ Ġopen ( src Out . resolve ("${ reply Receiver Name }.${ kt Or Java Ext } ")) Ċ } Ċ