diff options
author | Sebastien Hertz <shertz@google.com> | 2016-01-23 01:02:29 +0100 |
---|---|---|
committer | Sebastien Hertz <shertz@google.com> | 2016-02-02 07:26:46 +0000 |
commit | dd698e5a1fd80e0275980a608e5e3e9f5592378e (patch) | |
tree | 074f73257244cdd914ffae0acea5b12d53faa152 | |
parent | ee2e97d22f5be37d0b450317bc67ced53c0e57c3 (diff) | |
download | jacoco-dd698e5a1fd80e0275980a608e5e3e9f5592378e.tar.gz |
Build Jacoco as prebuiltandroid-n-preview-1
Jacoco is built with Maven to keep the advanced packaging behavior.
We store the prebuilt so it can be used by the Android build system
to apply code coverage onto an app.
Jacoco relocates most of its classes under a package that can change
each time we use Maven to update the prebuilt. Since Jack needs to
know this package name, we store it into a config.mk file
so the Android build system can read it and pass it to Jack.
Bug: 20115492
Change-Id: I8dd6e6a100d5a672f0753a8adac0786659f90e93
-rw-r--r-- | Android.mk | 23 | ||||
-rw-r--r-- | PREBUILT | 13 | ||||
-rw-r--r-- | config.mk | 16 | ||||
-rw-r--r-- | org.jacoco.agent.rt-0.7.5.201505241946-all.jar | bin | 0 -> 273599 bytes |
4 files changed, 52 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 00000000..d2edbc0a --- /dev/null +++ b/Android.mk @@ -0,0 +1,23 @@ +# +# Copyright (C) 2016 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. +# +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_PREBUILT_JAVA_LIBRARIES := \ + jacocoagent:org.jacoco.agent.rt-0.7.5.201505241946-all$(COMMON_JAVA_PACKAGE_SUFFIX) +LOCAL_MODULE_TAGS := optional +include $(BUILD_MULTI_PREBUILT) + diff --git a/PREBUILT b/PREBUILT new file mode 100644 index 00000000..9f9684fc --- /dev/null +++ b/PREBUILT @@ -0,0 +1,13 @@ +The jacocoagent.jar is updated in the following way: + +mvn install +rm -f jacocoagent.jar +cp org.jacoco.agent.rt/target/org.jacoco.agent.rt-0.7.5.201505241946-all.jar jacocoagent.jar +mvn clean + +The Android.mk must be updated to reference the right prebuilt. + +Also, the config.mk file must be updated to indicate what is the internal package name +containing the core classes of Jacoco (org.jacoco.agent.rt.internal_*) +Note: this information is available in the static field RUNTIMEPACKAGE +of the org.jacoco.core.JaCoCo class (http://eclemma.org/jacoco/trunk/doc/api/org/jacoco/core/JaCoCo.html#RUNTIMEPACKAGE) diff --git a/config.mk b/config.mk new file mode 100644 index 00000000..506caad6 --- /dev/null +++ b/config.mk @@ -0,0 +1,16 @@ +# Copyright (C) 2016 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. + +JACOCO_PACKAGE_NAME := org.jacoco.agent.rt.internal_d695e14 + diff --git a/org.jacoco.agent.rt-0.7.5.201505241946-all.jar b/org.jacoco.agent.rt-0.7.5.201505241946-all.jar Binary files differnew file mode 100644 index 00000000..a9162556 --- /dev/null +++ b/org.jacoco.agent.rt-0.7.5.201505241946-all.jar |