Deploy apk from repository

23 views
Skip to first unread message

Luzi Anderegg

unread,
May 14, 2014, 1:12:30 PM5/14/14
to maven-androi...@googlegroups.com
is it possible to deploy an apk from a repository? if yes, it is possible to deploy a specific version of an apk from a repository?

thanks,
luzi

Fredrik Jonson

unread,
May 15, 2014, 3:03:16 AM5/15/14
to maven-androi...@googlegroups.com
On 2014-05-14 at 10:12, luzi.a...@gmail.com wrote:

> is it possible to deploy an apk from a repository? if yes, it is
> possible to deploy a specific version of an apk from a repository?

You can do it in two steps:

mvn dependency:get -D artifact=com.example:foo-app:1.0.0:apk
adb install ~/.m2/repository/com/example/foo-app/1.0.0/foo-app-1.0.0.apk

--
Fredrik Jonson

Luzi Anderegg

unread,
May 15, 2014, 3:47:35 AM5/15/14
to maven-androi...@googlegroups.com
but not within the android maven plugin?

Malachi de Ælfweald

unread,
May 15, 2014, 3:55:13 AM5/15/14
to maven-androi...@googlegroups.com
Would you be OK with a pom.xml to run, or do you want it to run in a bare directory?

--
You received this message because you are subscribed to the Google Groups "Maven Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-deve...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Malachi de Ælfweald

unread,
May 15, 2014, 4:01:53 AM5/15/14
to maven-androi...@googlegroups.com
Oh, and this assumes you don't want to just click the Nexus URL on the device and install it that way.

Luzi Anderegg

unread,
May 15, 2014, 4:10:19 AM5/15/14
to maven-androi...@googlegroups.com
I am not so familiar with the maven terminology. what do you mean by run with a pom.xml and run it in a bare directory? Actually, I would like to automatically test an application update, i.e. deploy version 1 to the device, and then update to version 2. Thus, clicking on a URL is not an option. 

Malachi de Ælfweald

unread,
May 15, 2014, 4:18:35 AM5/15/14
to maven-androi...@googlegroups.com
Regarding bare/pom -- what I was asking is whether you are OK with a config file that specifies what to download and how to deploy it, etc... ie 'mvn install' (or whatever) to download and install the correct version.   That would allow you to hide the steps Frederik was suggesting.

As to the URL thing - that would allow testing your scenario... a simple HTML page could have the links to v1, v2, v3 etc... As you click each one, it would try to replace the existing install with that version.

It's really just a matter of what you are trying to accomplish...
On Thu, May 15, 2014 at 1:10 AM, Luzi Anderegg <luzi.a...@gmail.com> wrote:
I am not so familiar with the maven terminology. what do you mean by run with a pom.xml and run it in a bare directory? Actually, I would like to automatically test an application update, i.e. deploy version 1 to the device, and then update to version 2. Thus, clicking on a URL is not an option. 

--

Luzi Anderegg

unread,
May 15, 2014, 4:26:19 AM5/15/14
to maven-androi...@googlegroups.com
I would like to run the application update as part of my normal automatic test suite without manual interaction, so as part of some maven goal.

Malachi de Ælfweald

unread,
May 15, 2014, 4:35:16 AM5/15/14
to maven-androi...@googlegroups.com
If you have specified an instrumentation test module, it will automatically install the APK under test at the beginning of its run... I'm not sure whether it uninstalls it first or not.
On Thu, May 15, 2014 at 1:26 AM, Luzi Anderegg <luzi.a...@gmail.com> wrote:
I would like to run the application update as part of my normal automatic test suite without manual interaction, so as part of some maven goal.

--

Manfred Moser

unread,
May 16, 2014, 12:52:49 AM5/16/14
to maven-androi...@googlegroups.com
You could make on project that has a dependency on an old version and runs the deploy goal. And then another module that runs later in the reactor has the instrumentation tests. That would automatically install the latest version (also declared as a dependency on that project) and therefore run an update .. however I am not sure if you could capture the update process in a test run or would have to rely on a known state the application should end up in and have tests that assert that.

I am pretty sure this would work but I have not tried..

manfred

Malachi de Ćlfweald wrote on 15.05.2014 01:35:

>
> If you have specified an instrumentation test module, it will automatically install the APK under test at the beginning of its run... I'm not sure whether it uninstalls it first or not.
>
>
> Malachi de Ćlfweald
> http://www.google.com/profiles/malachid <http://www.google.com/profiles/malachid>
>
>
> On Thu, May 15, 2014 at 1:26 AM, Luzi Anderegg <luzi.a...@gmail.com <mailto:luzi.a...@gmail.com> > wrote:
>>
>> I would like to run the application update as part of my normal automatic test suite without manual interaction, so as part of some maven goal.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Maven Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-deve...@googlegroups.com <mailto:maven-android-deve...@googlegroups.com> .
>> For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout> .
>>
>>
> --
> You received this message because you are subscribed to the Google Groups "Maven Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-deve...@googlegroups.com <mailto:maven-android-deve...@googlegroups.com> .
> For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout> .
Reply all
Reply to author
Forward
0 new messages