This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# little application | |
main() { | |
assertCorrectAdb | |
assertAdbConnected | |
remountAsRootIfRequired |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.esolutions.gradle.plugin | |
import java.util.concurrent.TimeUnit | |
/** Running a command should be a simple "command".execute() in groovy, but reading | |
* output and making the command time-out at the same time, is somehow buggy and the | |
* process won't quit if it hangs. | |
* Thanks: https://stackoverflow.com/a/33265110/3968618 | |
* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add this to build.gradle | |
robolectric { | |
// Output and format the test results for vim-grand | |
afterTest { descriptor, result -> | |
//This part prints the class name with short result notation | |
def resultChar = '' | |
switch (result.resultType) { | |
case TestResult.ResultType.SUCCESS: | |
resultChar = '+' | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add test classes on the command line. Examples: | |
// gradle test -Dclasses=SomeClassTest // runs test/java/com/bla/SomeClassTest.java | |
// gradle test -Dclasses=*ActivityTest // runs all classes who's name ends in ActivityTest.java | |
// gradle test || gradle test -DClasses=all // both notations include all classes | |
def suppliedClasses = System.getProperty('classes', 'all') | |
if (suppliedClasses == 'all') { | |
println "target: all" | |
include '**/*Test.class' | |
} else { | |
def targetClass = '**/'+suppliedClasses +'.class' |