Skip to content

Commit 6aa59b9

Browse files
authored
Whitelist lint warning for missing tools:targetApi attr. (#728)
* Whitelist lint warning for missing tools:targetApi attr. * Add TODO to remove the warning from the whitelist.
1 parent a1d363b commit 6aa59b9

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

firebase-common/firebase-common.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ android {
5555
includeAndroidResources = true
5656
}
5757
}
58+
lintOptions {
59+
baseline file("lint-baseline.xml")
60+
}
5861
}
5962

6063
dependencies {

firebase-common/lint-baseline.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<issues format="5" by="lint 3.4.1" client="gradle" variant="all" version="3.4.1">
3+
<!-- TODO: remove when bazel support tools:targetApi -->
4+
<issue
5+
id="UnusedAttribute"
6+
message="Attribute `directBootAware` is only used in API level 24 and higher (current min is 14)"
7+
errorLine1=" android:directBootAware=&quot;true&quot; android:exported=&quot;false&quot;/>"
8+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
9+
<location
10+
file="src/main/AndroidManifest.xml"
11+
line="11"
12+
column="9"/>
13+
</issue>
14+
15+
</issues>

firebase-common/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
<application>
99

1010
<service android:name="com.google.firebase.components.ComponentDiscoveryService"
11-
android:directBootAware="true" android:exported="false"
12-
tools:targetApi="n" />
11+
android:directBootAware="true" android:exported="false"/>
1312

1413
<provider
1514
android:name="com.google.firebase.provider.FirebaseInitProvider"

0 commit comments

Comments
 (0)