0
org.gradle.parallel=true
がgradle.properties
にあります。私はバックエンドのGoogle Cloudモジュールを実行しており、並列にいくつかのエスプレッソテストを実行するconnectedAndroidTestを実行しています。テストは成功し、タスクは緑色でOK(画像参照)ですが、接続されたテストタスクは実際には終了しないか、または行をプリントすることはなく、キュー内の次のタスクに移動しません。Gradleの並列タスクが終了していません(connectedAndroidTest)
タスクを単独で実行すると、そのタスクが終了し、行が印刷されます。
マイルートbuild.gradleファイル:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
// Task to set up GCE, runs paid flavor test and shuts down the server.
task configureTest {
dependsOn 'startBackend', 'runInstrumentedTest', 'stopBackend'
doLast {
println 'Tests carried out and local server shut down'
}
}
task startBackend {
dependsOn ':backend:appengineRun'
}
// Run InstrumentedTest only in paid flavor as there is no interstitial ad.
task runInstrumentedTest {
mustRunAfter 'startBackend'
dependsOn ':app:connectedPaidDebugAndroidTest'
doLast {
println 'The test finished.'
}
}
task stopBackend
mustRunAfter 'runInstrumentedTest'
dependsOn ':backend:appengineStop'
}