blob: 385828931f56c3a734378e90f937d39f19dd3aaf [file] [log] [blame]
Payam Pakzadea487f82024-12-03 14:01:41 -08001/*
MingWeia0d220e2025-01-08 16:03:06 +00002 * Copyright (C) 2025 The Android Open Source Project
Payam Pakzadea487f82024-12-03 14:01:41 -08003 *
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 Nigamb8af53d2025-02-03 00:45:50 +053024
MingWei04e4bc72025-01-10 12:59:29 +000025import androidx.build.KotlinTarget
MingWei113fd0a2025-01-20 10:35:44 +000026import androidx.build.SdkHelperKt
Utkarsh Nigamb8af53d2025-02-03 00:45:50 +053027import androidx.build.SoftwareType
Payam Pakzadea487f82024-12-03 14:01:41 -080028
29plugins {
30 id("AndroidXPlugin")
31 id("kotlin")
32}
33
MingWei04e4bc72025-01-10 12:59:29 +000034androidx.configureAarAsJarForConfiguration("testImplementation")
Oluwarotimi Adesinad7a99af2025-03-19 12:17:21 +000035androidx.configureAarAsJarForConfiguration("api")
MingWei04e4bc72025-01-10 12:59:29 +000036
Payam Pakzadea487f82024-12-03 14:01:41 -080037dependencies {
38 api(libs.kotlinStdlib)
Tony Mak75ac0142025-02-20 22:52:41 +000039 api(libs.kspApi)
40
Yara Hassan78d17572025-02-03 09:30:23 +000041 implementation("androidx.annotation:annotation:1.7.0")
MingWei04e4bc72025-01-10 12:59:29 +000042 implementation(libs.kotlinPoet)
Utkarsh Nigam9521e6a2025-01-27 15:44:23 +053043 implementation(libs.kotlinReflect, {
44 exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib"
45 })
MingWei04e4bc72025-01-10 12:59:29 +000046
Utkarsh Nigame8be9b32025-01-24 16:17:43 +053047 // Added for reusing AppFunctionMetadata classes.
Oluwarotimi Adesinad7a99af2025-03-19 12:17:21 +000048 apiAarAsJar(project(":appfunctions:appfunctions-common"))
Utkarsh Nigame8be9b32025-01-24 16:17:43 +053049
MingWeia0300d22025-01-14 12:51:56 +000050 testImplementationAarAsJar(project(":appfunctions:appfunctions-common"))
MingWei04e4bc72025-01-10 12:59:29 +000051 testImplementationAarAsJar(project(":appfunctions:appfunctions-runtime"))
MingWei04e4bc72025-01-10 12:59:29 +000052 testImplementation(project(":room:room-compiler-processing-testing"))
53 testImplementation(libs.junit)
54 testImplementation(libs.truth)
Tony Mak75ac0142025-02-20 22:52:41 +000055
56 testRuntimeOnly(SdkHelperKt.getSdkDependency(project))
MingWei04e4bc72025-01-10 12:59:29 +000057}
58
59def testGeneratedSourcesPath = "${layout.buildDirectory.get().asFile}/testGeneratedSources"
60tasks.withType(Test).configureEach { test ->
61 test.doFirst {
62 systemProperty("test_output_dir", testGeneratedSourcesPath)
Utkarsh Nigamb8af53d2025-02-03 00:45:50 +053063 systemProperty("update_golden_files", System.getProperty("update_golden_files") ?: "false")
MingWei04e4bc72025-01-10 12:59:29 +000064 }
Payam Pakzadea487f82024-12-03 14:01:41 -080065}
66
67androidx {
MingWeia0d220e2025-01-08 16:03:06 +000068 name = "androidx.appfunctions:appfunctions-compiler"
Aurimas Liutikas37e83212025-01-23 13:26:10 -080069 type = SoftwareType.ANNOTATION_PROCESSOR
MingWeia0d220e2025-01-08 16:03:06 +000070 inceptionYear = "2025"
71 description = "AppFunction Compiler"
Daniel Santiago Rivera6c6067a2025-02-27 13:08:24 -050072 kotlinTarget = KotlinTarget.KOTLIN_2_0
Payam Pakzadea487f82024-12-03 14:01:41 -080073}