Currently srcJar shards are the longest pole in sharded javac execution [1](https://ui.perfetto.dev/#!/?s=b20570164f10b373408b92da9fb7069f649a5ceb) This change tries to balance the shards, by: 1) Providing the total number of srcJar shards. 2) Flattening srcJars into src list then feeding splits from the list to every srcJar shard. When applied, we save around 6s for a java method signature change in framework-minus-apex [2](https://ui.perfetto.dev/#!/?s=8f7acee29b6316fa9f46417f04d96807f3406e1b), compared to the original Bug: 387799579 Test: m framework-minus-apex, m nothing Change-Id: Ibae4f92de72f7ad537806d3f2c22be991d75de9e
31 lines
917 B
Plaintext
31 lines
917 B
Plaintext
// Copyright 2025 Google Inc. All rights reserved.
|
|
//
|
|
// 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.
|
|
|
|
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
blueprint_go_binary {
|
|
name: "split_zips",
|
|
deps: [
|
|
"android-archive-zip",
|
|
"blueprint-pathtools",
|
|
"soong-response",
|
|
],
|
|
srcs: [
|
|
"split_zips.go",
|
|
],
|
|
testSrcs: ["split_zips_test.go"],
|
|
}
|