1 We build an equivalent of the jacoco-agent.jar which contains classes from org.jacoco.core, 2 org.jacoco.agent and org.jacoco.agent.rt packages but also classes from asm 5.0.1. 3 4 However, Jacoco depends on classes that do not exist in Android (java.lang.instrument.* or 5 javax.management.*) for runtime instrumentation only. The ART compiler would reject those classes 6 when they are either in the bootclasspath (core, frameworks, ...) or system apps. 7 8 Since we only use offline instrumentation for code coverage (using Jack) and do not execute these 9 classes at runtime, we simply not compile them here. 10 11 We also need to modify the source code to cut dependencies to the classes that we exclude from the 12 compilation. The changes are surrounded by "BEGIN android-change" and "END android-change". Here 13 is the list of the changes: 14 15 1) Remove the creation of JmxRegistration in org.jacoco.agent.rt.internal.Agent. 16 2) Change default OutputMode to none in org.jacoco.core.runtime.AgentOptions 17 3) Merge https://github.com/jacoco/jacoco/pull/525 18 4) Update the build process to match #3: evaluate jacoco.properties, and add MANIFEST.MF 19
1 JaCoCo Java Code Coverage Library 2 ================================= 3 4 [![Build Status](https://travis-ci.org/jacoco/jacoco.svg?branch=master)](https://travis-ci.org/jacoco/jacoco) 5 [![Build status](https://ci.appveyor.com/api/projects/status/g28egytv4tb898d7/branch/master?svg=true)](https://ci.appveyor.com/project/JaCoCo/jacoco/branch/master) 6 [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.jacoco/org.jacoco.core/badge.svg?style=flat)](http://search.maven.org/#search|ga|1|g%3Aorg.jacoco) 7 8 JaCoCo is a free Java code coverage library distributed under the Eclipse Public 9 License. Check the [project homepage](http://www.jacoco.org/jacoco) 10 for downloads, documentation and feedback. 11 12 Please use our [mailing list](https://groups.google.com/forum/?fromgroups=#!forum/jacoco) 13 for questions regarding JaCoCo which are not already covered by the 14 [extensive documentation](http://www.jacoco.org/jacoco/trunk/doc/). 15 16 Note: We do not answer general questions in the project's issue tracker. Please use our [mailing list](https://groups.google.com/forum/?fromgroups=#!forum/jacoco) for this. 17 ------------------------------------------------------------------------- 18