Merge "Build core-simple against core.intra.stubs"
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index e88f8ea..4276511 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -82,9 +82,12 @@
filegroup {
name: "core_api_files",
srcs: [
+ ":bouncycastle_java_files",
+ ":conscrypt_java_files",
":core_oj_api_files",
":core_libart_api_files",
":core_simple_java_files",
+ ":okhttp_api_files",
],
}
diff --git a/luni/src/main/java/libcore/mmodule/CorePlatformApi.java b/luni/src/main/java/libcore/api/CorePlatformApi.java
similarity index 74%
rename from luni/src/main/java/libcore/mmodule/CorePlatformApi.java
rename to luni/src/main/java/libcore/api/CorePlatformApi.java
index bde943b..09837a0 100644
--- a/luni/src/main/java/libcore/mmodule/CorePlatformApi.java
+++ b/luni/src/main/java/libcore/api/CorePlatformApi.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package libcore.mmodule;
+package libcore.api;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
@@ -29,8 +29,12 @@
/**
* Indicates an API is part of a contract provided by the "core" set of
* libraries to select parts of the Android software stack.
- * <p>
- * This annotation should only appear on API that is already marked <pre>@hide</pre>.
+ *
+ * <p>This annotation should only appear on either (a) classes that are hidden by <pre>@hide</pre>
+ * javadoc tags or equivalent annotations, or (b) members of such classes. It is for use with
+ * metalava's {@code --show-single-annotation} option and so must be applied at the class level and
+ * applied again each member that is to be made part of the API. Members that are not part of the
+ * API do not have to be explicitly hidden.
*
* @hide
*/
diff --git a/luni/src/main/java/libcore/mmodule/IntraCoreMModuleApi.java b/luni/src/main/java/libcore/api/IntraCoreApi.java
similarity index 68%
rename from luni/src/main/java/libcore/mmodule/IntraCoreMModuleApi.java
rename to luni/src/main/java/libcore/api/IntraCoreApi.java
index a7d3b45..87cfcff 100644
--- a/luni/src/main/java/libcore/mmodule/IntraCoreMModuleApi.java
+++ b/luni/src/main/java/libcore/api/IntraCoreApi.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package libcore.mmodule;
+package libcore.api;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
@@ -29,13 +29,17 @@
/**
* Indicates an API is part of a contract within the "core" set of libraries, some of which may
* be mmodules.
- * <p>
- * This annotation should only appear on API that is already marked <pre>@hide</pre>.
+ *
+ * <p>This annotation should only appear on either (a) classes that are hidden by <pre>@hide</pre>
+ * javadoc tags or equivalent annotations, or (b) members of such classes. It is for use with
+ * metalava's {@code --show-single-annotation} option and so must be applied at the class level and
+ * applied again each member that is to be made part of the API. Members that are not part of the
+ * API do not have to be explicitly hidden.
*
* @hide
*/
-@IntraCoreMModuleApi // @IntraCoreMModuleApi is itself part of the intra-core API
+@IntraCoreApi // @IntraCoreApi is itself part of the intra-core API
@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE})
@Retention(RetentionPolicy.SOURCE)
-public @interface IntraCoreMModuleApi {
+public @interface IntraCoreApi {
}
diff --git a/luni/src/main/java/libcore/mmodule/libart/DemoLibartClass.java b/luni/src/main/java/libcore/mmodule/libart/DemoLibartClass.java
index c839acc..360d2035ce 100644
--- a/luni/src/main/java/libcore/mmodule/libart/DemoLibartClass.java
+++ b/luni/src/main/java/libcore/mmodule/libart/DemoLibartClass.java
@@ -16,8 +16,6 @@
package libcore.mmodule.libart;
-import libcore.mmodule.CorePlatformApi;
-import libcore.mmodule.IntraCoreMModuleApi;
import libcore.mmodule.simple.DemoSimpleClass;
/**
@@ -31,18 +29,16 @@
*
* @hide
*/
-@CorePlatformApi
-@IntraCoreMModuleApi
+@libcore.api.CorePlatformApi
+@libcore.api.IntraCoreApi
public class DemoLibartClass {
private DemoLibartClass() {}
/**
* A method that depends on the simple mmodule to work.
- *
- * @hide
*/
- @IntraCoreMModuleApi
+ @libcore.api.IntraCoreApi
public static String intraCoreDependencyMethod() {
// Delegate to core-simple code to implement the method.
return DemoSimpleClass.simpleMethod();
@@ -51,20 +47,16 @@
/**
* A simple method that has no native or data file dependencies but is part of the intra-core
* mmodule API contract.
- *
- * @hide
*/
- @IntraCoreMModuleApi
+ @libcore.api.IntraCoreApi
public static String simpleMethod() {
return "Hello World";
}
/**
* A core platform API method provided to higher-level code in the Android software stack.
- *
- * @hide
*/
- @CorePlatformApi
+ @libcore.api.CorePlatformApi
public static String corePlatformApiMethod() {
return "Hello World";
}
@@ -72,8 +64,6 @@
/**
* A method that is public but not part of either the intra-core or core platform API
* contracts, i.e. it cannot be used from the rest of the platform or another core mmodule.
- *
- * @hide
*/
public static String hiddenMethod() {
return "Hello World";
diff --git a/mmodules/core_platform_api/Android.bp b/mmodules/core_platform_api/Android.bp
index 1bfa363..523601d 100644
--- a/mmodules/core_platform_api/Android.bp
+++ b/mmodules/core_platform_api/Android.bp
@@ -24,7 +24,7 @@
no_framework_libs: true,
installable: false,
- args: "--show-annotation libcore.mmodule.CorePlatformApi",
+ args: "--show-single-annotation libcore.api.CorePlatformApi",
api_filename: "api.txt",
removed_api_filename: "removed.txt",
diff --git a/mmodules/intracoreapi/Android.bp b/mmodules/intracoreapi/Android.bp
index 1f2dd74..b54d721 100644
--- a/mmodules/intracoreapi/Android.bp
+++ b/mmodules/intracoreapi/Android.bp
@@ -26,7 +26,7 @@
api_filename: "api.txt",
installable: false,
- args: "--show-annotation libcore.mmodule.IntraCoreMModuleApi",
+ args: "--show-single-annotation libcore.api.IntraCoreApi",
}
// A library containing the {public SDK + intra-core} API stubs for the
diff --git a/mmodules/libart_oj/Android.bp b/mmodules/libart_oj/Android.bp
index 950e9b1..807f255 100644
--- a/mmodules/libart_oj/Android.bp
+++ b/mmodules/libart_oj/Android.bp
@@ -70,7 +70,7 @@
no_framework_libs: true,
installable: false,
- args: "--show-annotation libcore.mmodule.IntraCoreMModuleApi",
+ args: "--show-single-annotation libcore.api.IntraCoreApi",
}
// A library containing the {public SDK + intra-core} API stubs for
diff --git a/mmodules/simple/Android.bp b/mmodules/simple/Android.bp
index d109b4d..3d4ea9b 100644
--- a/mmodules/simple/Android.bp
+++ b/mmodules/simple/Android.bp
@@ -77,7 +77,7 @@
no_framework_libs: true,
installable: false,
- args: "--show-annotation libcore.mmodule.IntraCoreMModuleApi",
+ args: "--show-single-annotation libcore.api.IntraCoreApi",
api_filename: "api.txt",
removed_api_filename: "removed.txt",
diff --git a/mmodules/simple/src/main/java/libcore/mmodule/simple/DemoSimpleClass.java b/mmodules/simple/src/main/java/libcore/mmodule/simple/DemoSimpleClass.java
index 8ac03ad..a6bf475 100644
--- a/mmodules/simple/src/main/java/libcore/mmodule/simple/DemoSimpleClass.java
+++ b/mmodules/simple/src/main/java/libcore/mmodule/simple/DemoSimpleClass.java
@@ -16,7 +16,6 @@
package libcore.mmodule.simple;
-import libcore.mmodule.IntraCoreMModuleApi;
import libcore.mmodule.libart.DemoLibartClass;
/**
@@ -27,7 +26,7 @@
*
* @hide
*/
-@IntraCoreMModuleApi
+@libcore.api.IntraCoreApi
public class DemoSimpleClass {
private DemoSimpleClass() {}
@@ -35,20 +34,16 @@
/**
* A simple method that has no native or data file dependencies but is part of the simple
* mmodule's API contract.
- *
- * @hide
*/
- @IntraCoreMModuleApi
+ @libcore.api.IntraCoreApi
public static String simpleMethod() {
return "Hello World";
}
/**
* A method that depends on another part of the core libraries to work.
- *
- * @hide
*/
- @IntraCoreMModuleApi // Exposed for tests
+ @libcore.api.IntraCoreApi // Exposed for tests
public static String intraCoreDependencyMethod() {
// Delegate to core-libart code to implement the method.
return DemoLibartClass.simpleMethod();
@@ -56,8 +51,6 @@
/**
* A method that is public but not part of the simple mmodule's API contract.
- *
- * @hide
*/
public static String hiddenMethod() {
return "Hello World";
diff --git a/non_openjdk_java_files.bp b/non_openjdk_java_files.bp
index 0b5244c..d0b6d3d 100644
--- a/non_openjdk_java_files.bp
+++ b/non_openjdk_java_files.bp
@@ -156,8 +156,8 @@
"luni/src/main/java/javax/xml/xpath/XPathFunctionException.java",
"luni/src/main/java/javax/xml/xpath/XPathFunctionResolver.java",
"luni/src/main/java/javax/xml/xpath/XPathVariableResolver.java",
- "luni/src/main/java/libcore/mmodule/CorePlatformApi.java",
- "luni/src/main/java/libcore/mmodule/IntraCoreMModuleApi.java",
+ "luni/src/main/java/libcore/api/CorePlatformApi.java",
+ "luni/src/main/java/libcore/api/IntraCoreApi.java",
"luni/src/main/java/libcore/mmodule/libart/DemoLibartClass.java",
"json/src/main/java/org/json/JSON.java",
"json/src/main/java/org/json/JSONArray.java",