Android gradle task Google Appengine

后端 未结 1 909
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-06 07:57

I\'m trying to write a gradle task for my android application that starts the google appengine developer server, runs a test, and then closes the server.

What I\'ve trie

1条回答
  •  名媛妹妹
    2021-02-06 08:21

    You probably need to run your backend:appengineRun task in daemon mode so it allows the gradle process to continue. See : https://github.com/GoogleCloudPlatform/gradle-appengine-plugin#convention-properties

    This hack seems to work in my testing

    task runAppEngine (dependsOn: ":backend:appengineRun") {
      project(":backend").afterEvaluate { backend ->
        backend.extensions.appengine.daemon = true
      }              
      doLast {
        println "started the server!"
      }
    }
    
    runAppEngine.finalizedBy ":backend:appengineStop"
    // or whatever task you want it to stop after
    

    0 讨论(0)
提交回复
热议问题