diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
index 5a36fd0..9d7178e 100755
--- a/.idea/codeStyleSettings.xml
+++ b/.idea/codeStyleSettings.xml
@@ -6,6 +6,7 @@
         <option name="LINE_SEPARATOR" value="&#10;" />
         <option name="FIELD_NAME_PREFIX" value="m" />
         <option name="STATIC_FIELD_NAME_PREFIX" value="m" />
+        <option name="USE_FQ_CLASS_NAMES_IN_JAVADOC" value="false" />
         <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
         <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
         <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
@@ -87,6 +88,7 @@
           <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
         </XML>
         <codeStyleSettings language="Groovy">
+          <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
           <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
           <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
           <option name="BLANK_LINES_AROUND_FIELD" value="1" />
@@ -110,6 +112,8 @@
           <option name="PARENT_SETTINGS_INSTALLED" value="true" />
         </codeStyleSettings>
         <codeStyleSettings language="JAVA">
+          <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
+          <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />
           <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
           <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
           <option name="BLANK_LINES_AROUND_FIELD" value="1" />
diff --git a/build-system/builder/build.gradle b/build-system/builder/build.gradle
index dc60d4f..4965b85 100644
--- a/build-system/builder/build.gradle
+++ b/build-system/builder/build.gradle
@@ -26,6 +26,8 @@
     compile 'com.squareup:javawriter:2.5.0'
     compile 'org.bouncycastle:bcpkix-jdk15on:1.48'
     compile 'org.bouncycastle:bcprov-jdk15on:1.48'
+    compile 'org.ow2.asm:asm:4.0'
+    compile 'org.ow2.asm:asm-tree:4.0'
 
     testCompile 'junit:junit:3.8.1'
     testCompile 'org.mockito:mockito-all:1.9.5'
diff --git a/build-system/builder/builder.iml b/build-system/builder/builder.iml
index a4bd4e4..12cde02 100644
--- a/build-system/builder/builder.iml
+++ b/build-system/builder/builder.iml
@@ -20,5 +20,6 @@
     <orderEntry type="library" name="mockito" level="project" />
     <orderEntry type="module" module-name="sdk-common-base" />
     <orderEntry type="module" module-name="manifest-merger-base" />
+    <orderEntry type="library" exported="" name="asm-tools" level="project" />
   </component>
 </module>
\ No newline at end of file
diff --git a/build-system/builder/src/main/java/com/android/builder/testing/MockableJarGenerator.java b/build-system/builder/src/main/java/com/android/builder/testing/MockableJarGenerator.java
new file mode 100644
index 0000000..133c1b1c
--- /dev/null
+++ b/build-system/builder/src/main/java/com/android/builder/testing/MockableJarGenerator.java
@@ -0,0 +1,215 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.builder.testing;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.io.ByteStreams;
+
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.Type;
+import org.objectweb.asm.tree.AbstractInsnNode;
+import org.objectweb.asm.tree.ClassNode;
+import org.objectweb.asm.tree.InsnList;
+import org.objectweb.asm.tree.InsnNode;
+import org.objectweb.asm.tree.LdcInsnNode;
+import org.objectweb.asm.tree.MethodInsnNode;
+import org.objectweb.asm.tree.MethodNode;
+import org.objectweb.asm.tree.TypeInsnNode;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.util.Collections;
+import java.util.List;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.JarOutputStream;
+import java.util.zip.ZipEntry;
+
+/**
+ * Given a "standard" android.jar, creates a "mockable" version, where all classes and methods
+ * are not final. Optionally makes all methods return "default" values, instead of throwing the
+ * infamous "Stub!" exceptions.
+ */
+public class MockableJarGenerator {
+    private static final int EMPTY_FLAGS = 0;
+    private static final String CONSTRUCTOR = "<init>";
+    private static final ImmutableSet<Type> INTEGER_LIKE_TYPES = ImmutableSet.of(
+            Type.INT_TYPE, Type.BYTE_TYPE, Type.BOOLEAN_TYPE, Type.CHAR_TYPE, Type.SHORT_TYPE);
+
+    private final boolean returnDefaultValues;
+
+    public MockableJarGenerator(boolean returnDefaultValues) {
+        this.returnDefaultValues = returnDefaultValues;
+    }
+
+    public void createMockableJar(File input, File output) throws IOException {
+        Preconditions.checkState(
+                output.createNewFile(),
+                "Output file [%s] already exists.",
+                output.getAbsolutePath());
+
+        JarFile androidJar = null;
+        JarOutputStream outputStream = null;
+        try {
+            androidJar = new JarFile(input);
+            outputStream = new JarOutputStream(new FileOutputStream(output));
+
+            for (JarEntry entry : Collections.list(androidJar.entries())) {
+                InputStream inputStream = androidJar.getInputStream(entry);
+
+                if (entry.getName().endsWith(".class")) {
+                    rewriteClass(entry, inputStream, outputStream);
+                } else {
+                    outputStream.putNextEntry(entry);
+                    ByteStreams.copy(inputStream, outputStream);
+                }
+
+                inputStream.close();
+            }
+        } finally {
+            if (androidJar != null) {
+                androidJar.close();
+            }
+            if (outputStream != null) {
+                outputStream.close();
+            }
+        }
+    }
+
+    /**
+     * Writes a modified *.class file to the output JAR file.
+     */
+    private void rewriteClass(
+            JarEntry entry,
+            InputStream inputStream,
+            JarOutputStream outputStream) throws IOException {
+        ClassReader classReader = new ClassReader(inputStream);
+        ClassNode classNode = new ClassNode(Opcodes.ASM4);
+
+        classReader.accept(classNode, EMPTY_FLAGS);
+
+        modifyClass(classNode);
+
+        ClassWriter classWriter = new ClassWriter(EMPTY_FLAGS);
+        classNode.accept(classWriter);
+
+        outputStream.putNextEntry(new ZipEntry(entry.getName()));
+        outputStream.write(classWriter.toByteArray());
+    }
+
+    /**
+     * Modifies a {@link ClassNode} to clear final flags and rewrite byte code.
+     */
+    @SuppressWarnings("unchecked")
+    private void modifyClass(ClassNode classNode) {
+        // Make the class not final.
+        classNode.access &= ~Opcodes.ACC_FINAL;
+
+        List<MethodNode> methodNodes = classNode.methods;
+        for (MethodNode methodNode : methodNodes) {
+            methodNode.access &= ~Opcodes.ACC_FINAL;
+            fixMethodBody(methodNode);
+        }
+    }
+
+    /**
+     * Rewrites the method bytecode to remove the "Stub!" exception.
+     */
+    private void fixMethodBody(MethodNode methodNode) {
+        if ((methodNode.access & Opcodes.ACC_NATIVE) != 0
+                || (methodNode.access & Opcodes.ACC_ABSTRACT) != 0) {
+            // Abstract and native method don't have bodies to rewrite.
+            return;
+        }
+
+        Type returnType = Type.getReturnType(methodNode.desc);
+        InsnList instructions = methodNode.instructions;
+
+        if (methodNode.name.equals(CONSTRUCTOR)) {
+            // Keep the call to parent constructor, delete the exception after that.
+
+            boolean deadCode = false;
+            for (AbstractInsnNode instruction : instructions.toArray()) {
+                if (!deadCode) {
+                    if (instruction.getOpcode() == Opcodes.INVOKESPECIAL) {
+                        if (returnDefaultValues) {
+                            instructions.insert(instruction, new InsnNode(Opcodes.RETURN));
+                        } else {
+                            instructions.insert(instruction, throwExceptionsList(methodNode));
+                        }
+                        // Start removing all following instructions.
+                        deadCode = true;
+                    }
+                } else {
+                    instructions.remove(instruction);
+                }
+            }
+        } else {
+            instructions.clear();
+
+            if (returnDefaultValues) {
+                if (returnType.equals(Type.VOID_TYPE)) {
+                  return;
+                } else if (INTEGER_LIKE_TYPES.contains(returnType)) {
+                    instructions.add(new InsnNode(Opcodes.ICONST_0));
+                } else if (returnType.equals(Type.LONG_TYPE)) {
+                    instructions.add(new InsnNode(Opcodes.LCONST_0));
+                } else if (returnType.equals(Type.FLOAT_TYPE)) {
+                    instructions.add(new InsnNode(Opcodes.FCONST_0));
+                } else if (returnType.equals(Type.DOUBLE_TYPE)) {
+                    instructions.add(new InsnNode(Opcodes.DCONST_0));
+                } else {
+                    instructions.add(new InsnNode(Opcodes.ACONST_NULL));
+                }
+
+                instructions.add(new InsnNode(returnType.getOpcode(Opcodes.IRETURN)));
+            } else {
+                instructions.insert(throwExceptionsList(methodNode));
+            }
+        }
+    }
+
+    private static InsnList throwExceptionsList(MethodNode methodNode) {
+        try {
+            String runtimeException = Type.getInternalName(RuntimeException.class);
+            Constructor<RuntimeException> constructor =
+                    RuntimeException.class.getConstructor(String.class);
+
+            InsnList instructions = new InsnList();
+            instructions.add(
+                    new TypeInsnNode(Opcodes.NEW, runtimeException));
+            instructions.add(new InsnNode(Opcodes.DUP));
+            instructions.add(new LdcInsnNode("Method " + methodNode.name + " not mocked."));
+            instructions.add(new MethodInsnNode(
+                    Opcodes.INVOKESPECIAL,
+                    runtimeException,
+                    CONSTRUCTOR,
+                    Type.getType(constructor).getDescriptor()));
+            instructions.add(new InsnNode(Opcodes.ATHROW));
+
+            return instructions;
+        } catch (NoSuchMethodException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
diff --git a/build-system/builder/src/test/java/com/android/builder/testing/MockableJarGeneratorTest.java b/build-system/builder/src/test/java/com/android/builder/testing/MockableJarGeneratorTest.java
new file mode 100644
index 0000000..c475df9
--- /dev/null
+++ b/build-system/builder/src/test/java/com/android/builder/testing/MockableJarGeneratorTest.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.builder.testing;
+
+import com.android.testutils.TestUtils;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+import com.google.common.io.Files;
+
+import junit.framework.TestCase;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+public class MockableJarGeneratorTest extends TestCase {
+
+    public void testJarRewriting() throws Exception {
+        MockableJarGenerator generator = new MockableJarGenerator(true);
+
+        File inputJar = new File(TestUtils.getRoot("testing"), "non-mockable.jar");
+        File outputJar = new File(Files.createTempDir(), "mockable.jar");
+
+        generator.createMockableJar(inputJar, outputJar);
+
+        assertTrue(outputJar.exists());
+
+        Set<String> expectedEntries = ImmutableSet.of(
+                "META-INF/",
+                "META-INF/MANIFEST.MF",
+                "NonFinalClass.class",
+                "FinalClass.class");
+
+        Set<String> actualEntries = Sets.newHashSet();
+        JarFile jarFile = new JarFile(outputJar);
+        for (JarEntry entry : Collections.list(jarFile.entries())) {
+            actualEntries.add(entry.getName());
+        }
+
+        assertEquals(expectedEntries, actualEntries);
+        // TODO: Verify bytecode?
+
+        jarFile.close();
+    }
+}
\ No newline at end of file
diff --git a/build-system/builder/src/test/resources/testData/testing/non-mockable.jar b/build-system/builder/src/test/resources/testData/testing/non-mockable.jar
new file mode 100644
index 0000000..8df0203
--- /dev/null
+++ b/build-system/builder/src/test/resources/testData/testing/non-mockable.jar
Binary files differ
diff --git a/build-system/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy b/build-system/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy
index fd0b755..79c61f8 100755
--- a/build-system/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy
+++ b/build-system/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy
@@ -59,6 +59,7 @@
 import com.android.build.gradle.internal.tasks.DeviceProviderInstrumentTestTask
 import com.android.build.gradle.internal.tasks.GenerateApkDataTask
 import com.android.build.gradle.internal.tasks.InstallVariantTask
+import com.android.build.gradle.internal.tasks.MockableAndroidJarTask
 import com.android.build.gradle.internal.tasks.OutputFileTask
 import com.android.build.gradle.internal.tasks.PrepareDependenciesTask
 import com.android.build.gradle.internal.tasks.PrepareLibraryTask
@@ -129,6 +130,7 @@
 import com.android.builder.testing.api.TestServer
 import com.android.ide.common.internal.ExecutorSingleton
 import com.android.sdklib.AndroidTargetHash
+import com.android.sdklib.IAndroidTarget
 import com.android.sdklib.SdkVersionInfo
 import com.android.utils.ILogger
 import com.google.common.collect.ArrayListMultimap
@@ -221,8 +223,10 @@
     private static final String GRADLE_VERSION_CHECK_OVERRIDE_PROPERTY =
             "com.android.build.gradle.overrideVersionCheck"
 
-    private static final String INSTALL_GROUP = "Install"
-    private static final String BUILD_GROUP = org.gradle.api.plugins.BasePlugin.BUILD_GROUP
+    // These need to be public for gradle-dev.
+    public static final String INSTALL_GROUP = "Install"
+    public static final String BUILD_GROUP = org.gradle.api.plugins.BasePlugin.BUILD_GROUP
+    public static final String ANDROID_GROUP = "Android"
 
     public static File TEST_SDK_DIR;
 
@@ -271,6 +275,8 @@
     protected Task lintAll
     protected Task lintVital
 
+    public MockableAndroidJarTask createMockableJar
+
     protected BasePlugin(Instantiator instantiator, ToolingModelBuilderRegistry registry) {
         this.instantiator = instantiator
         this.registry = registry
@@ -488,6 +494,7 @@
             }
         }
 
+        createMockableJarTask();
         variantManager.createAndroidTasks(getSigningOverride())
         createReportTasks()
 
@@ -1716,6 +1723,7 @@
     void createUnitTestTasks() {
         Task topLevelTest = project.tasks.create(JavaPlugin.TEST_TASK_NAME)
         topLevelTest.group = JavaBasePlugin.VERIFICATION_GROUP
+        topLevelTest.dependsOn createMockableJar
 
         variantDataList.findAll{it.variantConfiguration.type == UNIT_TEST}.each { loopVariantData ->
             // Inner scope copy for the closures.
@@ -3055,16 +3063,32 @@
         return task
     }
 
+    private void createMockableJarTask() {
+        createMockableJar = project.tasks.create("mockableAndroidJar", MockableAndroidJarTask)
+        createMockableJar.group = BUILD_GROUP
+        createMockableJar.description = "Creates a version of android.jar that's suitable for unit tests."
+
+        conventionMapping(createMockableJar).map("androidJar") {
+            ensureTargetSetup()
+            new File(androidBuilder.target.getPath(IAndroidTarget.ANDROID_JAR))
+        }
+
+        conventionMapping(createMockableJar).map("outputFile") {
+            project.file(
+                    "$project.buildDir/${FD_INTERMEDIATES}/mockable-${extension.compileSdkVersion}.jar")
+        }
+    }
+
     private void createReportTasks() {
         def dependencyReportTask = project.tasks.create("androidDependencies", DependencyReportTask)
         dependencyReportTask.setDescription("Displays the Android dependencies of the project")
         dependencyReportTask.setVariants(variantManager.getVariantDataList())
-        dependencyReportTask.setGroup("Android")
+        dependencyReportTask.setGroup(ANDROID_GROUP)
 
         def signingReportTask = project.tasks.create("signingReport", SigningReportTask)
         signingReportTask.setDescription("Displays the signing info for each variant")
         signingReportTask.setVariants(variantManager.getVariantDataList())
-        signingReportTask.setGroup("Android")
+        signingReportTask.setGroup(ANDROID_GROUP)
     }
 
     public void createAnchorTasks(
diff --git a/build-system/gradle/src/main/groovy/com/android/build/gradle/internal/tasks/MockableAndroidJarTask.groovy b/build-system/gradle/src/main/groovy/com/android/build/gradle/internal/tasks/MockableAndroidJarTask.groovy
new file mode 100644
index 0000000..33c7c3d
--- /dev/null
+++ b/build-system/gradle/src/main/groovy/com/android/build/gradle/internal/tasks/MockableAndroidJarTask.groovy
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.build.gradle.internal.tasks
+
+import com.android.builder.testing.MockableJarGenerator
+import groovy.transform.CompileStatic
+import org.gradle.api.DefaultTask
+import org.gradle.api.tasks.InputFile
+import org.gradle.api.tasks.OutputFile
+import org.gradle.api.tasks.TaskAction
+
+/**
+ * Task for generating a mockable android.jar
+ */
+@CompileStatic
+class MockableAndroidJarTask extends DefaultTask {
+
+   @InputFile
+   File androidJar
+
+   @OutputFile
+   File outputFile
+
+   /**
+    * Whether the generated jar should return default values from all methods or throw exceptions.
+    */
+   boolean returnDefaultValues = true
+
+   @TaskAction
+   void createMockableJar() {
+      MockableJarGenerator generator = new MockableJarGenerator(returnDefaultValues)
+      getOutputFile().delete()
+      logger.info("Creating ${getOutputFile().absolutePath} from ${getAndroidJar().absolutePath}.")
+      generator.createMockableJar(getAndroidJar(), getOutputFile())
+   }
+}
diff --git a/build-system/integration-test/integration-test.iml b/build-system/integration-test/integration-test.iml
index 129b218..7ac1674 100644
--- a/build-system/integration-test/integration-test.iml
+++ b/build-system/integration-test/integration-test.iml
@@ -21,6 +21,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module" module-name="sdk-common-base" />
-    <orderEntry type="library" name="org.jacoco" level="project" />
+    <orderEntry type="library" name="jacoco" level="project" />
   </component>
 </module>
\ No newline at end of file
