blob: 106ba137f282426f4312a455b24ab1dc9ccef140 [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")
Utkarsh Nigame8be9b32025-01-24 16:17:43 +053035androidx.configureAarAsJarForConfiguration("implementation")
MingWei04e4bc72025-01-10 12:59:29 +000036
Payam Pakzadea487f82024-12-03 14:01:41 -080037dependencies {
38 api(libs.kotlinStdlib)
Yara Hassan78d17572025-02-03 09:30:23 +000039 implementation("androidx.annotation:annotation:1.7.0")
MingWei04e4bc72025-01-10 12:59:29 +000040 implementation(libs.kspApi)
41 implementation(libs.kotlinPoet)
Utkarsh Nigam9521e6a2025-01-27 15:44:23 +053042 implementation(libs.kotlinReflect, {
43 exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib"
44 })
MingWei04e4bc72025-01-10 12:59:29 +000045
Utkarsh Nigame8be9b32025-01-24 16:17:43 +053046 // Added for reusing AppFunctionMetadata classes.
47 implementationAarAsJar(project(":appfunctions:appfunctions-common"))
48
MingWeia0300d22025-01-14 12:51:56 +000049 testImplementationAarAsJar(project(":appfunctions:appfunctions-common"))
MingWei04e4bc72025-01-10 12:59:29 +000050 testImplementationAarAsJar(project(":appfunctions:appfunctions-runtime"))
MingWei113fd0a2025-01-20 10:35:44 +000051 testImplementation(SdkHelperKt.getSdkDependency(project))
MingWei04e4bc72025-01-10 12:59:29 +000052 testImplementation(libs.googleCompileTesting)
53 testImplementation(project(":room:room-compiler-processing-testing"))
54 testImplementation(libs.junit)
55 testImplementation(libs.truth)
56}
57
58def testGeneratedSourcesPath = "${layout.buildDirectory.get().asFile}/testGeneratedSources"
59tasks.withType(Test).configureEach { test ->
60 test.doFirst {
61 systemProperty("test_output_dir", testGeneratedSourcesPath)
Utkarsh Nigamb8af53d2025-02-03 00:45:50 +053062 systemProperty("update_golden_files", System.getProperty("update_golden_files") ?: "false")
MingWei04e4bc72025-01-10 12:59:29 +000063 }
Payam Pakzadea487f82024-12-03 14:01:41 -080064}
65
66androidx {
MingWeia0d220e2025-01-08 16:03:06 +000067 name = "androidx.appfunctions:appfunctions-compiler"
Aurimas Liutikas37e83212025-01-23 13:26:10 -080068 type = SoftwareType.ANNOTATION_PROCESSOR
MingWeia0d220e2025-01-08 16:03:06 +000069 inceptionYear = "2025"
70 description = "AppFunction Compiler"
MingWei04e4bc72025-01-10 12:59:29 +000071 kotlinTarget = KotlinTarget.KOTLIN_1_9
Payam Pakzadea487f82024-12-03 14:01:41 -080072}