Ok I got there in the end by putting the ui/server files in a directory:
list.files(recursive = TRUE)
[1] "app.R"
[4] "app/web-client.json"
[5] "app/server.R"
[6] "app/ui.R"
[7] "rsconnect/shinyapps.io/mark/test_shiny.dcf"
And app.R looks like:
library(shiny)
library(googleAuthR)
ui <- source("app/ui.R", chdir = TRUE)$value
server <- source("app/server.R", chdir = TRUE)$value
shinyApp(gar_shiny_ui(ui, login_ui = silent_auth), server)