Adding CURRENT_API to Java/Kotlin Api Finder lint-check to stay up-to-date on each branch.
This is a fix for an error where the API is too low to run on tm-release.
Test: The current tests in checks/src/test work in gradle, will work on getting these to work on Soong in the future.
This may require a feature request since these tests are currently required to run in a Studio source tree (see b/162368644)
Change-Id: I75e758eac03f34dbe6df9fab6d45880f53dcfae8
diff --git a/checks/src/main/java/com/android/apifinder/ApiFinderIssueRegistry.kt b/checks/src/main/java/com/android/apifinder/ApiFinderIssueRegistry.kt
index f2f91e2..97c740f 100644
--- a/checks/src/main/java/com/android/apifinder/ApiFinderIssueRegistry.kt
+++ b/checks/src/main/java/com/android/apifinder/ApiFinderIssueRegistry.kt
@@ -1,12 +1,13 @@
package com.android.apifinder
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.detector.api.CURRENT_API
import com.google.auto.service.AutoService
@AutoService(IssueRegistry::class)
@Suppress("UnstableApiUsage")
class ApiFinderIssueRegistry : IssueRegistry() {
override val api: Int
- get() = 7
+ get() = CURRENT_API
override val issues = listOf(ApiFinderDetector.ISSUE)
}