Payam Pakzad | ea487f8 | 2024-12-03 14:01:41 -0800 | [diff] [blame] | 1 | /* |
MingWei | a0d220e | 2025-01-08 16:03:06 +0000 | [diff] [blame] | 2 | * Copyright (C) 2025 The Android Open Source Project |
Payam Pakzad | ea487f8 | 2024-12-03 14:01:41 -0800 | [diff] [blame] | 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 | /** |
| 18 | * This file was created using the `create_project.py` script located in the |
| 19 | * `<AndroidX root>/development/project-creator` directory. |
| 20 | * |
| 21 | * Please use that script when creating a new project, rather than copying an existing project and |
| 22 | * modifying its settings. |
| 23 | */ |
Utkarsh Nigam | b8af53d | 2025-02-03 00:45:50 +0530 | [diff] [blame] | 24 | |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 25 | import androidx.build.KotlinTarget |
MingWei | 113fd0a | 2025-01-20 10:35:44 +0000 | [diff] [blame] | 26 | import androidx.build.SdkHelperKt |
Utkarsh Nigam | b8af53d | 2025-02-03 00:45:50 +0530 | [diff] [blame] | 27 | import androidx.build.SoftwareType |
Payam Pakzad | ea487f8 | 2024-12-03 14:01:41 -0800 | [diff] [blame] | 28 | |
| 29 | plugins { |
| 30 | id("AndroidXPlugin") |
| 31 | id("kotlin") |
| 32 | } |
| 33 | |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 34 | androidx.configureAarAsJarForConfiguration("testImplementation") |
Oluwarotimi Adesina | d7a99af | 2025-03-19 12:17:21 +0000 | [diff] [blame] | 35 | androidx.configureAarAsJarForConfiguration("api") |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 36 | |
Payam Pakzad | ea487f8 | 2024-12-03 14:01:41 -0800 | [diff] [blame] | 37 | dependencies { |
| 38 | api(libs.kotlinStdlib) |
Tony Mak | 75ac014 | 2025-02-20 22:52:41 +0000 | [diff] [blame] | 39 | api(libs.kspApi) |
| 40 | |
Yara Hassan | 78d1757 | 2025-02-03 09:30:23 +0000 | [diff] [blame] | 41 | implementation("androidx.annotation:annotation:1.7.0") |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 42 | implementation(libs.kotlinPoet) |
Utkarsh Nigam | 9521e6a | 2025-01-27 15:44:23 +0530 | [diff] [blame] | 43 | implementation(libs.kotlinReflect, { |
| 44 | exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib" |
| 45 | }) |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 46 | |
Utkarsh Nigam | e8be9b3 | 2025-01-24 16:17:43 +0530 | [diff] [blame] | 47 | // Added for reusing AppFunctionMetadata classes. |
Oluwarotimi Adesina | d7a99af | 2025-03-19 12:17:21 +0000 | [diff] [blame] | 48 | apiAarAsJar(project(":appfunctions:appfunctions-common")) |
Utkarsh Nigam | e8be9b3 | 2025-01-24 16:17:43 +0530 | [diff] [blame] | 49 | |
MingWei | a0300d2 | 2025-01-14 12:51:56 +0000 | [diff] [blame] | 50 | testImplementationAarAsJar(project(":appfunctions:appfunctions-common")) |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 51 | testImplementationAarAsJar(project(":appfunctions:appfunctions-runtime")) |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 52 | testImplementation(project(":room:room-compiler-processing-testing")) |
| 53 | testImplementation(libs.junit) |
| 54 | testImplementation(libs.truth) |
Tony Mak | 75ac014 | 2025-02-20 22:52:41 +0000 | [diff] [blame] | 55 | |
| 56 | testRuntimeOnly(SdkHelperKt.getSdkDependency(project)) |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | def testGeneratedSourcesPath = "${layout.buildDirectory.get().asFile}/testGeneratedSources" |
| 60 | tasks.withType(Test).configureEach { test -> |
| 61 | test.doFirst { |
| 62 | systemProperty("test_output_dir", testGeneratedSourcesPath) |
Utkarsh Nigam | b8af53d | 2025-02-03 00:45:50 +0530 | [diff] [blame] | 63 | systemProperty("update_golden_files", System.getProperty("update_golden_files") ?: "false") |
MingWei | 04e4bc7 | 2025-01-10 12:59:29 +0000 | [diff] [blame] | 64 | } |
Payam Pakzad | ea487f8 | 2024-12-03 14:01:41 -0800 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | androidx { |
MingWei | a0d220e | 2025-01-08 16:03:06 +0000 | [diff] [blame] | 68 | name = "androidx.appfunctions:appfunctions-compiler" |
Aurimas Liutikas | 37e8321 | 2025-01-23 13:26:10 -0800 | [diff] [blame] | 69 | type = SoftwareType.ANNOTATION_PROCESSOR |
MingWei | a0d220e | 2025-01-08 16:03:06 +0000 | [diff] [blame] | 70 | inceptionYear = "2025" |
| 71 | description = "AppFunction Compiler" |
Daniel Santiago Rivera | 6c6067a | 2025-02-27 13:08:24 -0500 | [diff] [blame] | 72 | kotlinTarget = KotlinTarget.KOTLIN_2_0 |
Payam Pakzad | ea487f8 | 2024-12-03 14:01:41 -0800 | [diff] [blame] | 73 | } |