xref: /aosp_15_r20/pdk/apps/TestingCamera/Android.bp (revision ac7df209e3ba002eb4fcfc7c8d4b818a0371fca4)
1*ac7df209SYuntao Xu// Copyright (C) 2012 The Android Open Source Project
2*ac7df209SYuntao Xu//
3*ac7df209SYuntao Xu// Licensed under the Apache License, Version 2.0 (the "License");
4*ac7df209SYuntao Xu// you may not use this file except in compliance with the License.
5*ac7df209SYuntao Xu// You may obtain a copy of the License at
6*ac7df209SYuntao Xu//
7*ac7df209SYuntao Xu//      http://www.apache.org/licenses/LICENSE-2.0
8*ac7df209SYuntao Xu//
9*ac7df209SYuntao Xu// Unless required by applicable law or agreed to in writing, software
10*ac7df209SYuntao Xu// distributed under the License is distributed on an "AS IS" BASIS,
11*ac7df209SYuntao Xu// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*ac7df209SYuntao Xu// See the License for the specific language governing permissions and
13*ac7df209SYuntao Xu// limitations under the License.
14*ac7df209SYuntao Xu
15*ac7df209SYuntao Xupackage {
16*ac7df209SYuntao Xu    // See: http://go/android-license-faq
17*ac7df209SYuntao Xu    default_applicable_licenses: ["Android-Apache-2.0"],
18*ac7df209SYuntao Xu}
19*ac7df209SYuntao Xu
20*ac7df209SYuntao Xuandroid_app {
21*ac7df209SYuntao Xu    name: "TestingCamera",
22*ac7df209SYuntao Xu    sdk_version: "current",
23*ac7df209SYuntao Xu    min_sdk_version: "23",
24*ac7df209SYuntao Xu    srcs: [
25*ac7df209SYuntao Xu        "src/**/*.java",
26*ac7df209SYuntao Xu        ":TestingCamera-rscript{TestingCamera.srcjar}",
27*ac7df209SYuntao Xu    ],
28*ac7df209SYuntao Xu    resource_zips: [
29*ac7df209SYuntao Xu        ":TestingCamera-rscript{TestingCamera.res.zip}",
30*ac7df209SYuntao Xu    ],
31*ac7df209SYuntao Xu    dex_preopt: {
32*ac7df209SYuntao Xu        enabled: false,
33*ac7df209SYuntao Xu    },
34*ac7df209SYuntao Xu}
35*ac7df209SYuntao Xu
36*ac7df209SYuntao Xugenrule {
37*ac7df209SYuntao Xu    name: "TestingCamera-rscript",
38*ac7df209SYuntao Xu    srcs: [
39*ac7df209SYuntao Xu        "src/**/*.rscript",
40*ac7df209SYuntao Xu        ":rs_script_api",
41*ac7df209SYuntao Xu        ":rs_clang_headers",
42*ac7df209SYuntao Xu    ],
43*ac7df209SYuntao Xu    tools: [
44*ac7df209SYuntao Xu        "llvm-rs-cc",
45*ac7df209SYuntao Xu        "soong_zip",
46*ac7df209SYuntao Xu    ],
47*ac7df209SYuntao Xu    out: [
48*ac7df209SYuntao Xu        "TestingCamera.srcjar",
49*ac7df209SYuntao Xu        "TestingCamera.res.zip",
50*ac7df209SYuntao Xu    ],
51*ac7df209SYuntao Xu    cmd: "for f in $(locations src/**/*.rscript); do " +
52*ac7df209SYuntao Xu        "  $(location llvm-rs-cc) -o $(genDir)/res/raw -p $(genDir)/src " +
53*ac7df209SYuntao Xu        "  -I $$(dirname $$(echo $(locations :rs_script_api) | awk '{ print $$1 }')) " +
54*ac7df209SYuntao Xu        "  -I $$(dirname $$(echo $(locations :rs_clang_headers) | awk '{ print $$1 }')) $${f}; " +
55*ac7df209SYuntao Xu        "done && " +
56*ac7df209SYuntao Xu        "$(location soong_zip) -srcjar -o $(location TestingCamera.srcjar) -C $(genDir)/src -D $(genDir)/src &&" +
57*ac7df209SYuntao Xu        "$(location soong_zip) -o $(location TestingCamera.res.zip) -C $(genDir)/res -D $(genDir)/res",
58*ac7df209SYuntao Xu}
59