| /* |
| * Copyright 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. |
| */ |
| |
| // IMPORTANT: Do not add any custom Gradle logic to this file. |
| |
| plugins { |
| // Note: The plugin on Google Maven may be newer than the public source. |
| // Plugin source code: https://android.googlesource.com/platform/platform_testing/+/main/libraries/sts-common-util/autorepro/plugin/autorepro/src/main/kotlin/com/android/security/autorepro/SubmissionPlugin.kt |
| id("com.android.security.autorepro.submission") |
| } |
| |
| fun getSubprojects(): List<Project> { |
| // glob for gradle direct subprojects |
| return fileTree(projectDir) { include("*/build.gradle*") } |
| .map { |
| val path = projectDir.toPath().relativize(it.toPath().getParent()) |
| val gradlePath = path.toString().replace('/', ':') |
| gradlePath |
| } |
| .filter({ |
| // filter out self build.gradle* |
| !it.isEmpty() |
| }) |
| .map { project(it) } |
| } |
| |
| // NOTE! all AutoRepro dependencies must be subprojects |
| dependencies { |
| // Automatically add each subproject as an AutoRepro Test Resource |
| getSubprojects().forEach { testResource(it) } |
| } |
| |
| // This DSL configures the submission manifest.json. |
| submission {} |