File: BUILD

package info (click to toggle)
zipflinger 7.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 6,076 kB
  • sloc: java: 4,491; xml: 69; makefile: 12
file content (213 lines) | stat: -rw-r--r-- 5,851 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
load("//tools/base/bazel:bazel.bzl", "iml_module")
load("//tools/base/bazel:maven.bzl", "maven_library")
load("//tools/base/common:version.bzl", "BUILD_VERSION")

maven_library(
    name = "zipflinger",
    srcs = glob([
        "src/com/android/zipflinger/**/*.java",
    ]),
    coordinates = "com.android:zipflinger:" + BUILD_VERSION,
    description = "Library used to build and incrementally modify zip files",
    visibility = [
        "//tools/base:__pkg__",
        "//tools/base/bazel:__subpackages__",
        "//tools/base/build-system:__subpackages__",
        "//tools/base/deploy/deployer:__subpackages__",
        "//tools/base/lint:__subpackages__",
        "//tools/base/signflinger:__subpackages__",
        "//tools/base/zipflinger/tools:__subpackages__",
    ],
    deps = [
        "//tools/base/annotations",
    ],
)

java_library(
    name = "test_utils",
    srcs = [
        "test/src/java/com/android/zipflinger/AbstractZipflingerTest.java",
        "test/src/java/com/android/zipflinger/MockInputStream.java",
    ],
    deps = [
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

java_test(
    name = "testParsing",
    size = "small",
    srcs = [
        "test/src/java/com/android/zipflinger/ParsingTest.java",
    ],
    data = [
        "test/resource/stripped.ap_",
        "test/resource/zip_no_fd.zip",
        "test/resource/zip_with_fd.zip",
    ],
    jvm_flags = ["-Dtest.suite.jar=testParsing.jar"],
    test_class = "com.android.testutils.JarTestSuite",
    deps = [
        ":test_utils",
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

java_test(
    name = "testsFreeStore",
    size = "small",
    srcs = [
        "test/src/java/com/android/zipflinger/FreeStoreTest.java",
    ],
    data = [
        "test/resource/zip_no_fd.zip",
        "test/resource/zip_with_fd.zip",
    ],
    jvm_flags = ["-Dtest.suite.jar=testsFreeStore.jar"],
    test_class = "com.android.testutils.JarTestSuite",
    deps = [
        ":test_utils",
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

java_test(
    name = "testsZipFlinger",
    size = "medium",
    srcs = [
        "test/src/java/com/android/zipflinger/ZipFlingerTest.java",
    ],
    data = [
        "test/resource/1-2-3files.zip",
        "test/resource/4-5files.zip",
        "test/resource/file1.txt",
        "test/resource/file2.txt",
        "test/resource/file3.txt",
        "test/resource/file4.txt",
        "test/resource/text.txt",
        "test/resource/two_files.zip",
        "test/resource/zip_with_directories.zip",
    ],
    jvm_flags = ["-Dtest.suite.jar=testsZipFlinger.jar"],
    tags = ["no_test_mac"],
    test_class = "com.android.testutils.JarTestSuite",
    deps = [
        ":test_utils",
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

java_test(
    name = "testZip64",
    size = "medium",
    srcs = [
        "test/src/java/com/android/zipflinger/Zip64Test.java",
    ],
    data = [
        "test/resource/5GiBFile.zip",
    ],
    jvm_flags = ["-Dtest.suite.jar=testZip64.jar"],
    test_class = "com.android.testutils.JarTestSuite",
    deps = [
        ":test_utils",
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

java_test(
    name = "testsCompressor",
    size = "small",
    srcs = [
        "test/src/java/com/android/zipflinger/CompressorTest.java",
    ],
    data = [
        "test/resource/file4.txt",
    ],
    jvm_flags = ["-Dtest.suite.jar=testsCompressor.jar"],
    test_class = "com.android.testutils.JarTestSuite",
    deps = [
        ":test_utils",
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

java_test(
    name = "testsMerge",
    size = "small",
    srcs = [
        "test/src/java/com/android/zipflinger/ZipMergeTest.java",
    ],
    data = [
        "test/resource/1-2-3files.zip",
        "test/resource/4-5files.zip",
    ],
    jvm_flags = ["-Dtest.suite.jar=testsMerge.jar"],
    test_class = "com.android.testutils.JarTestSuite",
    deps = [
        ":test_utils",
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

java_test(
    name = "testInts",
    size = "small",
    srcs = [
        "test/src/java/com/android/zipflinger/IntsTest.java",
    ],
    jvm_flags = ["-Dtest.suite.jar=testInts.jar"],
    test_class = "com.android.testutils.JarTestSuite",
    deps = [
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

java_test(
    name = "testRepo",
    size = "small",
    srcs = [
        "test/src/java/com/android/zipflinger/RepoTest.java",
    ],
    jvm_flags = ["-Dtest.suite.jar=testRepo.jar"],
    test_class = "com.android.testutils.JarTestSuite",
    deps = [
        ":test_utils",
        ":zipflinger",
        "//tools/base/testutils:tools.testutils",
        "@maven//:junit.junit",
    ],
)

# managed by go/iml_to_build
iml_module(
    name = "studio.android.sdktools.zipflinger",
    srcs = ["src"],
    iml_files = ["android.sdktools.zipflinger.iml"],
    lint_baseline = "lint_baseline.xml",
    tags = ["no_test_mac"],
    test_data = glob(["test/resource/**"]),
    test_srcs = ["test/src/java"],
    visibility = ["//visibility:public"],
    # do not sort: must match IML order
    deps = [
        "//prebuilts/studio/intellij-sdk:studio-sdk",
        "//tools/base/annotations:studio.android.sdktools.android-annotations[module]",
        "//tools/base/testutils:studio.android.sdktools.testutils[module, test]",
    ],
)