Add a project for kotlin support in AppSearch.
Currently we use standard Java interop for Kotlin support. The project
contains only a port of AnnotationProcessorTest from Java.
Bug: 187354820
Test: AnnotationProcessorKtTest.kt
Relnote: N/A
Change-Id: I8af398175f4ab8071b1057163f1c0cb3442f57a2
diff --git a/appsearch/appsearch-ktx/build.gradle b/appsearch/appsearch-ktx/build.gradle
new file mode 100644
index 0000000..4a421a3
--- /dev/null
+++ b/appsearch/appsearch-ktx/build.gradle
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import androidx.build.LibraryGroups
+import androidx.build.LibraryVersions
+import androidx.build.Publish
+
+import static androidx.build.dependencies.DependenciesKt.*
+
+plugins {
+ id('AndroidXPlugin')
+ id('com.android.library')
+ id('org.jetbrains.kotlin.android')
+ id('org.jetbrains.kotlin.kapt')
+}
+
+dependencies {
+ api(KOTLIN_STDLIB)
+
+ kaptAndroidTest project(':appsearch:appsearch-compiler')
+ androidTestImplementation project(':appsearch:appsearch')
+ androidTestImplementation project(':appsearch:appsearch-local-storage')
+ androidTestImplementation(ANDROIDX_TEST_CORE)
+ androidTestImplementation(ANDROIDX_TEST_RULES)
+ androidTestImplementation(TRUTH)
+}
+
+androidx {
+ name = 'AndroidX AppSearch - Kotlin Extensions'
+ publish = Publish.SNAPSHOT_AND_RELEASE
+ mavenGroup = LibraryGroups.APPSEARCH
+ mavenVersion = LibraryVersions.APPSEARCH
+ inceptionYear = '2021'
+ description = 'AndroidX AppSearch - Kotlin Extensions'
+}