Deploying With Ktor: How To Set AppEngine Version?

2019-05-26 19:06发布

问题:

Issue

I've followed this clear and concise Ktor tutorial. Now that I have successfully deployed to AppEngine I would like to manually set the version of future deploys.

Google's documentation of the appengine-web.xml file indicates the <version> tag can be utilized for this purpose, but also states that the <version> tag is unused for Cloud SDK based tooling. I attempted to set the tag and confirmed this value is not being used when deployed to AppEngine.

Attempted Solutions

Looked for way to define AppEngine version in the following files:

  1. web.xml
  2. application.conf

Setting id:

ktor {    
    application {
        modules = [InitializationKt.main]
        id = "coinverse-price-staging"
    }
}
  1. Searching for way to define in AppEngine deploy command.

回答1:

Thank you to @marco for uncovering the solution to this!

build.gradle

appengine {
    deploy {
        version = '1-2-0'
    }
}