[go: nahoru, domu]

blob: 8f08622bff22c6f608b46d6dd56765ccd1955ca9 [file] [log] [blame]
Daniel Santiago Rivera0c716ae2020-03-01 11:27:57 -08001/*
2 * Copyright 2020 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
Owen Gray74cc2592020-09-24 15:05:40 -040017import androidx.build.LibraryType
Daniel Santiago Rivera006c7bb2020-04-07 11:51:16 -070018import androidx.build.SdkHelperKt
19import androidx.build.SupportConfig
Daniel Santiago Rivera0c716ae2020-03-01 11:27:57 -080020
Daniel Santiago Rivera0c716ae2020-03-01 11:27:57 -080021plugins {
22 id("AndroidXPlugin")
23 id("kotlin")
24 id("kotlin-kapt")
25}
26
Ember Rosec662e1a2022-09-16 14:37:50 -040027androidx.configureAarAsJarForConfiguration("testImplementation")
Aurimas Liutikas7d0ea3322022-09-13 18:47:56 -070028
Daniel Santiago Rivera0c716ae2020-03-01 11:27:57 -080029dependencies {
Aurimas Liutikas7f247902021-05-19 08:43:01 -070030 implementation(libs.kotlinStdlib)
31 compileOnly(libs.autoServiceAnnotations)
32 kapt(libs.autoService)
33 compileOnly(libs.gradleIncapHelper)
34 kapt(libs.gradleIncapHelperProcessor)
35 implementation(libs.autoCommon)
36 implementation(libs.javapoet)
Daniel Santiago Rivera0c716ae2020-03-01 11:27:57 -080037
Daniel Santiago Rivera2de05ef2020-09-25 17:49:39 -070038 testImplementation(project(":hilt:hilt-common"))
Aurimas Liutikas7f247902021-05-19 08:43:01 -070039 testImplementation(libs.junit)
40 testImplementation(libs.truth)
41 testImplementation(libs.googleCompileTesting)
42 testImplementation(libs.hiltCore)
Ember Rosec662e1a2022-09-16 14:37:50 -040043 testImplementationAarAsJar(project(":hilt:hilt-work"))
Jim Sproch9e38b4f2021-01-06 14:21:06 -080044 testImplementation(fileTree(
Daniel Santiago Rivera006c7bb2020-04-07 11:51:16 -070045 dir: "${SdkHelperKt.getSdkPath(project)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/",
Jim Sproch9e38b4f2021-01-06 14:21:06 -080046 include : "android.jar"))
Daniel Santiago Rivera0c716ae2020-03-01 11:27:57 -080047}
48
Aurimas Liutikas420b7f62022-08-02 13:53:39 -070049tasks.withType(Test).configureEach {
50 // https://github.com/google/compile-testing/issues/222
51 it.jvmArgs "--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"
52}
53
Daniel Santiago Rivera0c716ae2020-03-01 11:27:57 -080054androidx {
Daniel Santiago Rivera67f849d2020-04-02 17:12:21 -070055 name = "AndroidX Hilt Extension Compiler"
Daniel Santiago Rivera565946b2022-08-01 11:49:07 -070056 type = LibraryType.ANNOTATION_PROCESSOR
Daniel Santiago Rivera67f849d2020-04-02 17:12:21 -070057 mavenVersion = LibraryVersions.HILT
58 mavenGroup = LibraryGroups.HILT
Daniel Santiago Rivera0c716ae2020-03-01 11:27:57 -080059 inceptionYear = "2020"
Daniel Santiago Rivera67f849d2020-04-02 17:12:21 -070060 description = "AndroidX Hilt Extension Compiler"
Alex Saveaub50d5002020-07-14 05:25:54 +000061}