Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Feature/add task for Activity Stack #85

Merged
merged 5 commits into from
Aug 28, 2015
Merged

Conversation

friedger
Copy link
Contributor

This PR adds an ActivityStack task and an new task to the sample dumping the activity stack.

The task is based on AdbCommand, however, it does not uses runCommand (and not handleCommandOutput as tried initially 6c3f45d) because runCommand does not return anything and the would not have access to the activity stack.

Now users can call getActivityStack and perform actions on the stack in their custom task.

The default action is dumping the stack. The output looks like

:sample:dumpActivityStack
#3: com.google.android.gms/.update.SystemUpdateActivity
#2: com.google.android.calculator/com.android.calculator2.Calculator
#1: com.google.android.youtube/com.google.android.apps.youtube.app.WatchWhileActivity
#0: com.android.vending/com.google.android.finsky.activities.MainActivity
#1: com.google.android.googlequicksearchbox/com.google.android.launcher.GEL
#0: com.android.systemui/.recents.RecentsActivity

@hal9002
Copy link

hal9002 commented Jul 13, 2015

Refer to this link for build results (access rights to CI server needed):
https://ci.novoda.com/job/gradle-android-command-plugin-prb/9/
Test PASSed.

@@ -0,0 +1,20 @@
package com.novoda.gradle.command

class ActivityStack extends AdbTask {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, seems this task does not do anything by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, if we need access to the stack the AdbTask is not ideal as tried
to explain in the PR description
Am 13.07.2015 16:23 schrieb "Volker Leck" notifications@github.com:

In
gradle-android-command-plugin/src/main/groovy/com/novoda/gradle/command/ActivityStack.groovy
#85 (comment)
:

@@ -0,0 +1,20 @@
+package com.novoda.gradle.command
+
+class ActivityStack extends AdbTask {

Hmm, seems this task does not do anything by default.


Reply to this email directly or view it on GitHub
https://github.com/novoda/gradle-android-command-plugin/pull/85/files#r34467426
.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, did not read that carefully enough.

The base class approach to provide adb access might be something to rethink in general.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the task you define below could be the default behaviour here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devisnik moved dump to the task class.

@hal9002
Copy link

hal9002 commented Jul 14, 2015

Refer to this link for build results (access rights to CI server needed):
https://ci.novoda.com/job/gradle-android-command-plugin-prb/11/
Test PASSed.

@friedger
Copy link
Contributor Author

@devisnik Good to merge?

@devisnik
Copy link
Contributor

👍

devisnik added a commit that referenced this pull request Aug 28, 2015
Feature/add task for Activity Stack
@devisnik devisnik merged commit acea58f into develop Aug 28, 2015
@devisnik devisnik deleted the feature/activitystack branch August 28, 2015 20:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants