forked from organicmaps/organicmaps
Added gradle tasks to build & launch app automatically (runFLAVOR_NAME, eg. runGoogleProRelease or rGPR).
This commit is contained in:
parent
28c8f64c68
commit
4cd3851fe7
1 changed files with 15 additions and 13 deletions
|
@ -231,6 +231,21 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
android.applicationVariants.all { variant ->
|
||||
def task = variant.name.capitalize()
|
||||
def runTask = "run$task"
|
||||
def installTask = "install$task"
|
||||
project.task(type: Exec, "${runTask}", dependsOn: "${installTask}") {
|
||||
doLast {
|
||||
def component = "com.mapswithme.maps.pro/com.mapswithme.maps.DownloadResourcesActivity"
|
||||
executable "sh"
|
||||
args "-c", "adb shell am start -n ${component}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
mapswithme {
|
||||
storeFile file('../tools/android/mapswithme.keystore')
|
||||
|
@ -279,19 +294,6 @@ android {
|
|||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
|
||||
// TODO add tasks for all flavors to run app.
|
||||
task runGooglePro(type: Exec, description: 'install iGPR and run') {
|
||||
commandLine 'bash', '-c', 'adb shell am start -n com.mapswithme.maps.pro/com.mapswithme.maps.DownloadResourcesActivity'
|
||||
}
|
||||
|
||||
// temprorary workaround of bug on android L with gradle plugin
|
||||
// details here https://groups.google.com/forum/#!topic/adt-dev/oHWbLdonsBU
|
||||
gradle.projectsEvaluated {
|
||||
installGoogleProRelease.dependsOn("uninstallGoogleProRelease")
|
||||
runGooglePro.dependsOn("installGoogleProRelease")
|
||||
}
|
||||
}
|
||||
|
||||
//@{ Below are tasks needed to compile our NDK part
|
||||
|
|
Loading…
Add table
Reference in a new issue