Git Product home page Git Product logo

Comments (5)

vanniktech avatar vanniktech commented on June 25, 2024

Awesome. Works perfectly fine for me. If you want to just use ./gradlew clean test you have to add this to build.gradle:

tasks.withType(Test) {
    dependsOn assembleDebug
}

Although than you may get a problem with the testRelease task. Therefore execute:

./gradlew clean test -x testRelease

from androidstudioandrobolectric.

nenick avatar nenick commented on June 25, 2024

here is an enhanced version

afterEvaluate { project ->
    android.libraryVariants.each { variant ->
        tasks.getByName("test${ variant.name.capitalize()}") {
            dependsOn "assemble${ variant.name.capitalize()}"
        }
    }
}

from androidstudioandrobolectric.

jaredsburrows avatar jaredsburrows commented on June 25, 2024

Isnt this issue a duplicate of #5?

from androidstudioandrobolectric.

nenick avatar nenick commented on June 25, 2024

They are two different issues.

This one miss the compiled main classes of the current library module under test. Google issue was merged into https://code.google.com/p/android/issues/detail?id=156027

The other one miss resource files specified under test (and is already fixed with 1.2beta).

from androidstudioandrobolectric.

nenick avatar nenick commented on June 25, 2024

Fixed with gradle android plugin 1.2.+

from androidstudioandrobolectric.

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.