blob: 2839392031a384ca67db00033b8dbc28c4e9a4e2 [file] [log] [blame]
// Copyright (C) 2024 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.
// For ravenwood.
// TODO(b/340889954) Enable --supported-api-list-file, once AOSP gets this feature.
java_genrule {
name: "core-icu4j-for-host.ravenwood-base",
tools: ["hoststubgen"],
cmd: "$(location hoststubgen) " +
"@$(location :ravenwood-standard-options) " +
"--debug-log $(location hoststubgen_core-icu4j-for-host.log) " +
"--stats-file $(location hoststubgen_core-icu4j-for-host_stats.csv) " +
// "--supported-api-list-file $(location hoststubgen_core-icu4j-for-host_apis.csv) " +
"--out-impl-jar $(location ravenwood.jar) " +
"--gen-keep-all-file $(location hoststubgen_core-icu4j-for-host_keep_all.txt) " +
"--gen-input-dump-file $(location hoststubgen_core-icu4j-for-host_dump.txt) " +
"--in-jar $(location :core-icu4j-for-host) " +
"--policy-override-file $(location icu-ravenwood-policies.txt) " +
"--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ",
srcs: [
":core-icu4j-for-host",
"icu-ravenwood-policies.txt",
":ravenwood-standard-options",
":ravenwood-annotation-allowed-classes",
],
out: [
"ravenwood.jar",
// Following files are created just as FYI.
"hoststubgen_core-icu4j-for-host_keep_all.txt",
"hoststubgen_core-icu4j-for-host_dump.txt",
"hoststubgen_core-icu4j-for-host.log",
"hoststubgen_core-icu4j-for-host_stats.csv",
// "hoststubgen_core-icu4j-for-host_apis.csv",
],
defaults: ["ravenwood-internal-only-visibility-genrule"],
}
// Extract the impl jar from "core-icu4j-for-host.ravenwood-base" for subsequent build rules.
// Note this emits a "device side" output, so that ravenwood tests can (implicitly)
// depend on it.
java_genrule {
name: "core-icu4j-for-host.ravenwood",
defaults: ["ravenwood-internal-only-visibility-genrule"],
cmd: "cp $(in) $(out)",
srcs: [
":core-icu4j-for-host.ravenwood-base{ravenwood.jar}",
],
out: [
"core-icu4j-for-host.ravenwood.jar",
],
}