blob: 97303cf0d0ac051c9769d31ea2d70f6cadbec7ae [file] [log] [blame]
/**
* A gradle init script that will attach given Jvm Args to each Test task.
*/
def jvmArgs = startParameter.systemPropertiesArgs.get("androidx.room.testJvmArgs")
taskGraph.addTaskExecutionGraphListener { graph ->
graph.beforeTask { task ->
if (task instanceof Test) {
task.jvmArgs(jvmArgs)
// this environment variable is used to avoid running profiling tests
// unless we are in a profiling execution
task.environment("ANDROIDX_ROOM_ENABLE_PROFILE_TESTS", "true")
}
}
}