| // Copyright (C) 2018 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. |
| |
| filegroup { |
| name: "core_simple_java_files", |
| srcs: ["src/main/java/**/*.java"] |
| } |
| |
| java_defaults { |
| name: "core-simple-defaults", |
| srcs: [":core_simple_java_files"], |
| installable: true, |
| |
| // As a logical part of the set of core libs we cannot use |
| // no_standard_libs: false here because this core jar is one of the |
| // default standard libs and that leads to a cycle. |
| no_standard_libs: true, |
| libs: ["core.intra.stubs"], |
| system_modules: "core-intra-stubs-system-modules", |
| openjdk9: { |
| javacflags: ["--patch-module=java.base=."], |
| }, |
| |
| dxflags: ["--core-library"], |
| } |
| |
| // A library containing the implementation of core-simple. |
| java_library { |
| name: "core-simple", |
| hostdex: true, |
| defaults: ["core-simple-defaults"], |
| java_version: "1.9", |
| } |
| |
| // A guaranteed unstripped version of core-simple. |
| // The build system may or may not strip the core-simple jar |
| // but this will not be stripped. See b/24535627. |
| java_library { |
| name: "core-simple-testdex", |
| defaults: ["core-simple-defaults"], |
| dex_preopt: { |
| enabled: false, |
| }, |
| java_version: "1.9", |
| } |
| |
| // Tests associated with the core-simple intra-core APIs. |
| java_test { |
| name: "core-simple-intra-test", |
| srcs: [ "src/test/java/**/*.java" ], |
| |
| no_standard_libs: true, |
| libs: [ |
| // We depend on stubs not the impl code. We do not test |
| // internals, just the {public SDK + intra-core} APIs. |
| "core.intra.stubs", |
| // Other deps needed for tests. |
| "junit", |
| ], |
| system_modules: "core-intra-stubs-system-modules", |
| } |
| |
| // Generates stub source files for the {public SDK + intra-core} APIs |
| // of core-simple. |
| droidstubs { |
| name: "core-simple-intra-stubs", |
| srcs: [":core_simple_java_files"], |
| no_framework_libs: true, |
| |
| installable: false, |
| args: "--show-single-annotation libcore.api.IntraCoreApi", |
| |
| api_filename: "api.txt", |
| removed_api_filename: "removed.txt", |
| previous_api: "previous.txt", |
| check_api: { |
| current: { |
| api_file: "api/intra/current-api.txt", |
| removed_api_file: "api/intra/current-removed.txt", |
| }, |
| last_released: { |
| api_file: "api/intra/last-api.txt", |
| removed_api_file: "api/intra/last-removed.txt", |
| }, |
| }, |
| java_version: "1.9", |
| } |
| |
| // A library containing the {public SDK + intra-core} API stubs for |
| // core-simple. |
| java_library { |
| name: "core-simple.intra.stubs", |
| srcs: [":core-simple-intra-stubs"], |
| |
| no_standard_libs: true, |
| // We use core.intra.stubs here to prove that we have all the dependencies |
| // needed to compile the simple intra stubs within the intra stubs, i.e. |
| // there are no non-API references. |
| libs: ["core.intra.stubs"], |
| system_modules: "core-intra-stubs-system-modules", |
| openjdk9: { |
| javacflags: ["--patch-module=java.base=."], |
| }, |
| java_version: "1.9", |
| } |