Skip to content

Commit 6ac955d

Browse files
committed
make linter baseline
1 parent a745f3c commit 6ac955d

File tree

4 files changed

+53
-3
lines changed

4 files changed

+53
-3
lines changed

library/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ android {
5252
withJavadocJar()
5353
}
5454
}
55+
lint {
56+
baseline = file("lint-baseline.xml")
57+
}
5558
}
5659

5760
protobuf {

library/lint-baseline.xml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<issues format="6" by="lint 8.0.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.0)" variant="all" version="8.0.0">
3+
4+
<issue
5+
id="NewApi"
6+
message="Call requires API level 33 (current min is 23): `java.lang.ref.Cleaner#create`"
7+
errorLine1=" val cleaner = java.lang.ref.Cleaner.create()"
8+
errorLine2=" ~~~~~~">
9+
<location
10+
file="src/main/java/xmtpv3.kt"
11+
line="2270"
12+
column="41"/>
13+
</issue>
14+
15+
<issue
16+
id="NewApi"
17+
message="Call requires API level 33 (current min is 23): `java.lang.ref.Cleaner#register`"
18+
errorLine1=" JavaLangRefCleanable(cleaner.register(value, cleanUpTask))"
19+
errorLine2=" ~~~~~~~~">
20+
<location
21+
file="src/main/java/xmtpv3.kt"
22+
line="2273"
23+
column="38"/>
24+
</issue>
25+
26+
<issue
27+
id="NewApi"
28+
message="Call requires API level 33 (current min is 23): `java.lang.ref.Cleaner.Cleanable#clean`"
29+
errorLine1=" override fun clean() = cleanable.clean()"
30+
errorLine2=" ~~~~~">
31+
<location
32+
file="src/main/java/xmtpv3.kt"
33+
line="2279"
34+
column="38"/>
35+
</issue>
36+
37+
<issue
38+
id="SimpleDateFormat"
39+
message="To get local formatting use `getDateInstance()`, `getDateTimeInstance()`, or `getTimeInstance()`, or use `new SimpleDateFormat(String template, Locale locale)` with for example `Locale.US` for ASCII dates."
40+
errorLine1=" val formatter = SimpleDateFormat(&quot;EEE, dd MMM yyyy HH:mm:ss &apos;GMT&apos;&quot;)"
41+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
42+
<location
43+
file="src/main/java/org/xmtp/android/library/messages/Signature.kt"
44+
line="53"
45+
column="21"/>
46+
</issue>
47+
48+
</issues>

library/src/main/java/xmtpv3.kt

-1
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,6 @@ private fun UniffiCleaner.Companion.create(): UniffiCleaner =
22692269
private class JavaLangRefCleaner : UniffiCleaner {
22702270
val cleaner = java.lang.ref.Cleaner.create()
22712271

2272-
@SuppressLint("NewApi")
22732272
override fun register(value: Any, cleanUpTask: Runnable): UniffiCleaner.Cleanable =
22742273
JavaLangRefCleanable(cleaner.register(value, cleanUpTask))
22752274
}

library/src/test/java/org/xmtp/android/library/RemoteAttachmentTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class RemoteAttachmentTest {
4040
}
4141

4242
@Test
43-
@Ignore
43+
@Ignore("Flaky")
4444
fun testCanUseRemoteAttachmentCodec() {
4545
val attachment = Attachment(
4646
filename = "test.txt",
@@ -122,7 +122,7 @@ class RemoteAttachmentTest {
122122
}
123123

124124
@Test
125-
@Ignore
125+
@Ignore("Flaky")
126126
fun testEnsuresContentDigestMatches() {
127127
val attachment = Attachment(
128128
filename = "test.txt",

0 commit comments

Comments
 (0)