aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-11-22 13:57:52 -0800
committerColin Cross <ccross@android.com>2017-12-21 14:16:16 -0800
commitb760c4765ce42102cda379f1cbcb164c9fa80b41 (patch)
tree980afff0ebba6b52b2d8575d914b1bb2e97ef09d
parent9ba7a6cafc38113f7f51f387d2b72c8b95ce35aa (diff)
downloadjacoco-b760c4765ce42102cda379f1cbcb164c9fa80b41.tar.gz
Update build files for new version of jacoco
Also remove asm-debug-all-5.0.1.jar in favor of the asm 6.0 prebuilts in prebuilts/misc/common/asm. Bug: 69669951 Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false tests Change-Id: Idfda865afa9d3f40a388431aebee08455e4c8db8
-rw-r--r--Android.bp49
-rw-r--r--PREBUILT7
-rw-r--r--asm-debug-all-5.0.1.jarbin380292 -> 0 bytes
3 files changed, 22 insertions, 34 deletions
diff --git a/Android.bp b/Android.bp
index 3e570205..a4c103ca 100644
--- a/Android.bp
+++ b/Android.bp
@@ -14,18 +14,6 @@
// limitations under the License.
//
-// Some Jacoco source files depend on classes that do not exist in Android. While these classes are
-// not executed at runtime (because we use offline instrumentation), they will cause issues when
-// compiling them with ART during dex pre-opting. Therefore, it would prevent from applying code
-// coverage on classes in the bootclasspath (frameworks, services, ...) or system apps.
-// Note: we still may need to update the source code to cut dependencies in mandatory jacoco classes.
-jacoco_android_exclude_list = [
- "%org.jacoco.core/src/org/jacoco/core/runtime/ModifiedSystemClassRuntime.java",
- "%org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java",
- "%org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/CoverageTransformer.java",
- "%org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java",
-]
-
// Build jacoco-agent from sources for the platform
//
// Note: this is only intended to be used for the platform development. This is *not* intended
@@ -39,6 +27,14 @@ java_library {
"org.jacoco.agent.rt/src/**/*.java",
],
+ // Some Jacoco source files depend on classes that do not exist in Android.
+ // While these classes are not executed at runtime (because we use offline
+ // instrumentation), they will cause issues when compiling them with ART
+ // during dex pre-opting. Therefore, it would prevent from applying code
+ // coverage on classes in the bootclasspath (frameworks, services, ...) or
+ // system apps.
+ // Note: we still may need to update the source code to cut dependencies in
+ // mandatory jacoco classes.
exclude_srcs: [
"org.jacoco.core/src/org/jacoco/core/runtime/ModifiedSystemClassRuntime.java",
"org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java",
@@ -46,12 +42,19 @@ java_library {
"org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java",
],
- // In order to include Jacoco in core libraries, we cannot depend on anything in the
- // bootclasspath (or we would create dependency cycle). Therefore we compile against
- // the SDK android.jar which gives the same APIs Jacoco depends on.
+ // In order to include Jacoco in core libraries, we cannot depend on
+ // anything in the bootclasspath (or we would create dependency cycle).
+ // Therefore we compile against the SDK android.jar which gives the same
+ // APIs Jacoco depends on.
sdk_version: "9",
- static_libs: ["jacoco-asm"],
+ // TODO(b/69671801): there's no bytecode on the device, so these shouldn't
+ // be necessary.
+ static_libs: [
+ "asm-6.0",
+ "asm-commons-6.0",
+ "asm-tree-6.0",
+ ],
}
// Build jacoco-cli from sources for the platform
@@ -75,17 +78,9 @@ java_library_host {
],
static_libs: [
- "jacoco-asm",
+ "asm-6.0",
+ "asm-commons-6.0",
+ "asm-tree-6.0",
"args4j-2.0.28",
],
}
-
-//
-// Build asm-5.0.1 as a static library
-//
-java_import {
- name: "jacoco-asm",
- host_supported: true,
-
- jars: ["asm-debug-all-5.0.1.jar"],
-}
diff --git a/PREBUILT b/PREBUILT
deleted file mode 100644
index c8d9fd8c..00000000
--- a/PREBUILT
+++ /dev/null
@@ -1,7 +0,0 @@
-The ASM jar required by jacoco is updated in the following way:
-
-mvn -f org.jacoco.agent.rt/pom.xml dependency:copy-dependencies
-cp org.jacoco.agent.rt/target/dependency/asm-debug-all-5.0.1.jar ./
-mvn clean
-
-The Android.mk must be updated to reference the right prebuilt.
diff --git a/asm-debug-all-5.0.1.jar b/asm-debug-all-5.0.1.jar
deleted file mode 100644
index 76d4b6a7..00000000
--- a/asm-debug-all-5.0.1.jar
+++ /dev/null
Binary files differ