Created
July 20, 2021 19:40
-
-
Save bmc08gt/92b15ef9bc86529864343b565d15e71d to your computer and use it in GitHub Desktop.
Gradle task to piggyback off install task allowing CLI opening of the app.
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
android.applicationVariants.all { variant -> | |
task "open${variant.name.capitalize()}" { | |
dependsOn "install${variant.name.capitalize()}" | |
doLast { | |
exec { | |
commandLine "adb shell monkey -p ${variant.applicationId} -c android.intent.category.LAUNCHER 1".split(" ") | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment