xref: /aosp_15_r20/external/jetpack-camera-app/build.gradle.kts (revision 7e7863dab8204bb545ead586e736dea632e06846)
1 /*
<lambda>null2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 // Top-level build file where you can add configuration options common to all sub-projects/modules.
18 plugins {
19     alias(libs.plugins.android.application) apply false
20     alias(libs.plugins.android.library) apply false
21     alias(libs.plugins.android.test) apply false
22     alias(libs.plugins.kotlin.android) apply false
23     alias(libs.plugins.dagger.hilt.android) apply false
24     alias(libs.plugins.kotlin.kapt) apply false
25 
26 }
27 
<lambda>null28 tasks.register<Copy>("installGitHooks") {
29     println("Installing git hooks")
30     from(rootProject.rootDir.resolve("hooks/pre-commit"))
31     into(rootProject.rootDir.resolve(".git/hooks"))
32     fileMode = 7 * 64 + 7 * 8 + 5 // 0775 in decimal
33 }
34 
<lambda>null35 gradle.taskGraph.whenReady {
36     allTasks.forEach { task ->
37         if (task != tasks["installGitHooks"]) {
38             task.dependsOn(tasks["installGitHooks"])
39         }
40     }
41 }
42 
43 // Task to print all the module paths in the project e.g. :core:data
44 // Used by module graph generator script
45 tasks.register("printModulePaths") {
<lambda>null46     subprojects {
47         if (subprojects.size == 0) {
48             println(this.path)
49         }
50     }
51 }