Skip to content

Commit

Permalink
Add android lint baseline file and config
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndiritu committed Nov 19, 2024
1 parent 8bf69f1 commit 0a815b3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
15 changes: 6 additions & 9 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,17 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

lint {
baseline = file("lint-baseline.xml")
}

lintOptions {
textOutput "stdout"
checkAllWarnings true
warningsAsErrors true
disable "UnusedResources" // Unused will be removed on release
disable "IconExpectedSize" // Using the material icons provided from Google
disable "GoogleAppIndexingApiWarning" // We might want to index our app later
disable "InvalidPackage" // Butterknife, Okio and Realm
disable "ResourceType" // Annotation binding
disable "GradleDependency"
disable "NewerVersionAvailable"
disable "DuplicatePlatformClasses" // xpp3 added by azure-identity
disable "LambdaLast"
lintConfig file("lint.xml")
}

sourceSets {
main {
java.srcDirs = ['../src/main/java']
Expand Down
11 changes: 11 additions & 0 deletions android/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.7.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.7.2)" variant="all" version="8.7.2">

<issue
id="InvalidPackage"
message="Invalid package reference in com.azure:azure-xml; not included in Android: `javax.xml.stream`. Referenced from `com.azure.xml.XmlReader`.">
<location
file="$GRADLE_USER_HOME/caches/modules-2/files-2.1/com.azure/azure-xml/1.1.0/8218a00c07f9f66d5dc7ae2ba613da6890867497/azure-xml-1.1.0.jar"/>
</issue>

</issues>
6 changes: 6 additions & 0 deletions android/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="LambdaLast">
<ignore path="../src/main/java/com/microsoft/graph/core/requests/GraphClientFactory.java" />
</issue>
</lint>

0 comments on commit 0a815b3

Please sign in to comment.