-
Notifications
You must be signed in to change notification settings - Fork 969
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update lint issue registration mechanism
- Loading branch information
John Rodriguez
committed
Aug 8, 2021
1 parent
f13fafd
commit bab5800
Showing
4 changed files
with
34 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
apply plugin: 'java-library' | ||
apply plugin: 'kotlin' | ||
apply plugin: 'org.jetbrains.kotlin.kapt' | ||
apply plugin: 'com.android.lint' | ||
|
||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
dependencies { | ||
compileOnly deps.lint.api | ||
compileOnly deps.lint.checks | ||
|
||
compileOnly deps.auto.serviceAnnotations | ||
kapt deps.auto.service | ||
testImplementation deps.junit | ||
testImplementation deps.lint.core | ||
testImplementation deps.lint.tests | ||
testImplementation deps.junit | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes('Lint-Registry-v2': 'timber.lint.TimberIssueRegistry') | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
timber-lint/src/main/java/timber/lint/TimberIssueRegistry.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
timber-lint/src/main/java/timber/lint/TimberIssueRegistry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package timber.lint | ||
|
||
import com.android.tools.lint.client.api.IssueRegistry | ||
import com.android.tools.lint.client.api.Vendor | ||
import com.android.tools.lint.detector.api.CURRENT_API | ||
import com.google.auto.service.AutoService | ||
|
||
@AutoService(value = [IssueRegistry::class]) | ||
class TimberIssueRegistry : IssueRegistry() { | ||
override val issues = WrongTimberUsageDetector.getIssues().asList() | ||
|
||
override val api = CURRENT_API | ||
|
||
/** | ||
* works with Studio 4.0 or later; see | ||
* [com.android.tools.lint.detector.api.describeApi] | ||
*/ | ||
override val minApi = 7 | ||
|
||
override val vendor = Vendor( | ||
vendorName = "JakeWharton/timber", | ||
identifier = "com.jakewharton.timber:timber:{version}", | ||
feedbackUrl = "https://github.com/JakeWharton/timber/issues", | ||
) | ||
} |