Skip to content

Commit

Permalink
Allow obfuscate PublicSuffixDatabase (#6974)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvb2060 committed Jan 3, 2022
1 parent c48f63b commit 9b4b06f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Expand Up @@ -237,7 +237,8 @@ class PublicSuffixDatabase {
}

companion object {
const val PUBLIC_SUFFIX_RESOURCE = "publicsuffixes.gz"
@JvmField
val PUBLIC_SUFFIX_RESOURCE = "${PublicSuffixDatabase::class.java.simpleName}.gz"

private val WILDCARD_LABEL = byteArrayOf('*'.code.toByte())
private val PREVAILING_RULE = listOf("*")
Expand Down
2 changes: 1 addition & 1 deletion okhttp/src/jvmMain/resources/META-INF/proguard/okhttp3.pro
Expand Up @@ -2,7 +2,7 @@
-dontwarn javax.annotation.**

# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
-adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz

# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*
Expand Down
@@ -1,4 +1,4 @@
Note that publicsuffixes.gz is compiled from The Public Suffix List:
Note that PublicSuffixDatabase.gz is compiled from The Public Suffix List:
https://publicsuffix.org/list/public_suffix_list.dat

It is subject to the terms of the Mozilla Public License, v. 2.0:
Expand Down

0 comments on commit 9b4b06f

Please sign in to comment.