Merge pie-platform-release to aosp-master - DO NOT MERGE

Change-Id: I6452206ac9e84122a448066a4b6397366c33fffe
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..01b80f7
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,32 @@
+//
+// Copyright (C) 2011 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.
+//
+
+java_library {
+    name: "apache-commons-math",
+    host_supported: true,
+    java_version: "1.7",
+
+    srcs: ["src/main/java/**/*.java"],
+    sdk_version: "current",
+    errorprone: {
+        javacflags: ["-Xep:MissingOverride:OFF"],
+    },
+}
+
+java_library_host {
+    name: "apache-commons-math-host",
+    static_libs: ["apache-commons-math"],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index f2d7b5a..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Copyright (C) 2011 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)
-
-apache-commons-math_src_files := $(call all-java-files-under,src/main/java)
-
-# build target jar
-# ============================================================
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := apache-commons-math
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := $(apache-commons-math_src_files)
-LOCAL_JAVACFLAGS := -encoding UTF-8
-LOCAL_SDK_VERSION := current
-LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-# build host jar
-# ============================================================
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := apache-commons-math-host
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := $(apache-commons-math_src_files)
-LOCAL_JAVACFLAGS := -encoding UTF-8
-LOCAL_SDK_VERSION := current
-LOCAL_JAVA_LANGUAGE_VERSION := 1.7
-LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
-include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..a8d4e43
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,20 @@
+name: "apache-commons-matjh"
+description: "The Apache Commons Math project is a library of lightweight, self-contained mathematics and statistics components addressing the most common practical problems not immediately available in the Java programming language or commons-lang."
+
+third_party {
+  url {
+    type: HOMEPAGE
+    value: "https://github.com/apache/commons-math"
+  }
+  url {
+    type: ARCHIVE
+    value: "https://github.com/apache/commons-math/archive/MATH_2_2.zip"
+  }
+  version: "MATH_2_2"
+  license_type: RECIPROCAL
+  last_upgrade_date {
+    year: 2011
+    month: 3
+    day: 20
+  }
+}