Coder Social home page Coder Social logo

Comments (8)

tdrhq avatar tdrhq commented on May 5, 2024

(I should preface this by saying that while I wrote all the gradle scripts here, I'm by no means a gradle expert so I might be wrong about what I'm going to say, but here goes:)

you need to set up both testApkTarget and connectedAndroidTestTarget. The first is the one that generates the APK, the second is the one that runs the tests on the devies. So it looks like the flavored target you listed should actually be the connectedAndroidTestTarget configuration.

In theory I should be able to figure out the testApkTarget from connectedAndroidTestTarget and simplify the configuration. I'll see if I can make that work somehow, but in the meantime can you try my suggestion and see if this works?

from screenshot-tests-for-android.

Kusand avatar Kusand commented on May 5, 2024

Got it now. I'd update your documentation to reflect that testApkTarget
needs to be "package" and the connectedAndroidTestTarget
needs to be "connected". I'm pretty sure this is only needed
because I'm using flavors. Having it automatically respect flavors would
also be nice.

On Thu, Dec 3, 2015 at 1:34 PM, Arnold Noronha [email protected]
wrote:

(I should preface this by saying that while I wrote all the gradle scripts
here, I'm by no means a gradle expert so I might be wrong about what I'm
going to say, but here goes:)

you need to set up both testApkTarget and connectedAndroidTestTarget. The
first is the one that generates the APK, the second is the one that runs
the tests on the devies. So it looks like the flavored target you listed
should actually be the connectedAndroidTestTarget configuration.

In theory I should be able to figure out the testApkTarget from
connectedAndroidTestTarget and simplify the configuration. I'll see if I
can make that work somehow, but in the meantime can you try my suggestion
and see if this works?


Reply to this email directly or view it on GitHub
#17 (comment)
.

from screenshot-tests-for-android.

gpeal avatar gpeal commented on May 5, 2024

I also had to do this and it resolved my issue. Documentation around this would be incredibly helpful!

from screenshot-tests-for-android.

Kusand avatar Kusand commented on May 5, 2024

I've added documentation in The Gradle Setup wiki page, in the hopes of helping others.

from screenshot-tests-for-android.

kylannjohnson avatar kylannjohnson commented on May 5, 2024

I needed to do this

// This task reports the location of the Test APK generated by the build for use by Facebook Screenshot Tests
task packageDebugAndroidTest(dependsOn: 'assembleDebugTest') {
  outputs.dir file("${buildDir}/outputs/apk").listFiles().findAll {it.name.contains('androidTest-unaligned')}
}

from screenshot-tests-for-android.

athkalia avatar athkalia commented on May 5, 2024

Having a similar problem related to flavors.
After the usual

gradlew :<mylibraryname>:screenshotTests

(note that this is a library project and 'mylibraryname' is just a dummy name)
I am getting a:

> Task with path 'packageDebugAndroidTest' not found in project ':<mylibraryname>'.

Instead there is a 'packageProductionDebugAndroidTest' defined task where 'Production' is a flavor.
Isn't there a way to pick that up automatically?

from screenshot-tests-for-android.

SergeyShustikov avatar SergeyShustikov commented on May 5, 2024

I facing with the same problem.

from screenshot-tests-for-android.

xiphirx avatar xiphirx commented on May 5, 2024

The rewrite generates tasks per flavor.

from screenshot-tests-for-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.