Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Plugin #9

Closed
JakeWharton opened this issue Jan 24, 2013 · 13 comments
Closed

Gradle Plugin #9

JakeWharton opened this issue Jan 24, 2013 · 13 comments
Milestone

Comments

@JakeWharton
Copy link
Collaborator

So we can be run with almost no effort under the new build system. Maybe an example as well.

@cbrammer
Copy link

This would be really great. Any progress on this?

@x2on
Copy link
Contributor

x2on commented Sep 23, 2013

Im currently working on a basic gradle plugin.
https://github.com/x2on/gradle-spoon-plugin

@roman-mazur
Copy link
Contributor

@x2on I started developing my own version of the plugin few hours before your message here :)
It will be available at Maven Central in several hours.
https://github.com/stanfy/spoon-gradle-plugin

@roman-mazur
Copy link
Contributor

@JakeWharton could somebody from the Spoon team take a look at that plugin?

@x2on
Copy link
Contributor

x2on commented Sep 24, 2013

@roman-mazur thats funny - i just also refactored to use the android plugin. now i looked at your plugin, and we have almost the same idea ;) Perhaps we should work together on the plugin.

@MariusVolkhart
Copy link

Much of the functionality of Spoon has been integrated into the instrumentTest task in the new build system.

Looking at both of the plugins, they both act as a wrapper for the SpoonRunner class. It'd be great if we could instead leverage the existing task. Besides reducing the need for a lot of the current spoon classes, it would integrate the reports with Gradle's report system better and allow for DeviceProviders to be used with Spoon.

I had a solution in mind, but don't know enough to implement it just yet.

It would "inject" an action into the instrumentTest task which would use adb to pull files off the device right before the uninstall happens. After the instrumentTest task, a custom task would execute which would generate the Spoon reports using customTask.mustRunAfter instrumentTest.

Thoughts?

PS. @roman-mazur @x2on thank you both for bringing this to gradle until there's a v2.0 release!

@JakeWharton
Copy link
Collaborator Author

That sounds reasonable to me. My biggest fear is leaning on the inflexibility of the standard Gradle reports. We could always just produce a companion report to the real one with the additional data.

@roman-mazur
Copy link
Contributor

I definitely agree that tests should be run with android plugin. The only reason I've implemented our current plugin as a wrapper for spoon runner is that it took the shortest time.
Frankly speaking I do not believe we'll get better integration with Gradle reports. The last time I was looking at their reporting code, all the classes belonged to internal API and were not rather flexible...

@JakeWharton
Copy link
Collaborator Author

Yeah I haven't had time to look deeply yet. It'll probably represent a fundamental shift in this tool, however.

@roman-mazur
Copy link
Contributor

A dramatical shift :)
We won't need to use ddmlib directly for running tests. At least for
gradle builds.
Will the maven plugin be deprecated?
On 20 Dec 2013 21:14, "Jake Wharton" notifications@github.com wrote:

Yeah I haven't had time to look deeply yet. It'll probably represent a
fundamental shift in this tool, however.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-31033988
.

@edenman
Copy link
Collaborator

edenman commented Mar 16, 2015

Closing this out. https://github.com/stanfy/spoon-gradle-plugin is what we're using internally now.

@edenman edenman closed this as completed Mar 16, 2015
@roman-mazur
Copy link
Contributor

But I would love to this revived for v2.

@JakeWharton
Copy link
Collaborator Author

If there ever is a v2, it won't be anything at all like the current project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants