# Android's plugin debug output not generated

**URL:** <https://discuss.gradle.org/t/androids-plugin-debug-output-not-generated/843>\
**Category:** Old Forum Archive\
**Created:** [August 12, 2014, 1:00pm UTC](https://discuss.gradle.org/t/androids-plugin-debug-output-not-generated/843 "2014-08-12T13:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Rusev](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Daniel\_Rusev](https://discuss.gradle.org/u/Daniel_Rusev)\
**Post date:** [August 12, 2014, 1:00pm UTC](https://discuss.gradle.org/t/androids-plugin-debug-output-not-generated/843/1 "2014-08-12T13:00:00Z")

</div>

I’m using Gradle 1.9, the version of the android plugin is 0.7.3. As you probably know, the android plugin has two outputs - debug and release.

My project depends on another project.

I’ve created my own task to execute the unit tests. It depends on the debug output. Here’s its definition in the build.gradle file of the main project.

```gradle
sourceSets {
    unitTest {
        java.srcDirs = ['tests']
    }
}
  dependencies {
    unitTestCompile files("build/classes/debug") //This is the debug output of the main project
    unitTestCompile files("../otherproject/build/classes/debug") //This is the debug output of the other project
    unitTestCompile 'junit:junit:4.11'
    unitTestCompile 'org.robolectric:robolectric:2.2'
    unitTestCompile 'com.google.android:android:4.1.1.4'
        unitTestCompile 'org.mockito:mockito-all:1.9.5'
}
  configurations {
                unitTestCompile.extendsFrom compile
        unitTestCompile.extendsFrom runTime
        unitTestRuntime.extendsFrom unitTestCompile
                          unitTestEclipseCompile {
            extendsFrom unitTestCompile
            exclude group: "com.google.android", name: "android"
            transitive = false
        }
        }
  task unitTest(type:Test, dependsOn: assemble) {
        description = "run unit tests"
        testClassesDir = project.sourceSets.unitTest.output.classesDir
        classpath = project.sourceSets.unitTest.runtimeClasspath
       }

```

The problem is that the debug output is not generated, so when I type

```gradle
gradle unitTest

```

in the command line, I get

```gradle
java.lang.ClassNotFoundException

```

.

In order for the debug output to be generated, I have to explicitly run

```gradle
gradle assembleDebug

```

before I run unitTest.

I’ve tried the following things, neither of which has worked:

```gradle
unitTest.dependsOn assembleDebug
assembleDebug.outputs.upToDateWhen { false }

```

The problem doesn’t go away regardless of whether the task is out of date or not, So, for example, if I make a slight modification in one of the source files, and then run

```gradle
gradle unitTest

```

, the release output is generated with the new .class files, but not the debug output.
