diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt index e7360da7e..1cc90b89e 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt @@ -1,12 +1,14 @@ package io.legado.app.model.analyzeRule import android.text.TextUtils +import androidx.annotation.Keep import com.jayway.jsonpath.JsonPath import com.jayway.jsonpath.ReadContext import io.legado.app.utils.splitNotBlank import java.util.* import java.util.regex.Pattern +@Keep class AnalyzeByJSonPath { private var ctx: ReadContext? = null diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt index 38fb633c5..7e49ac677 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt @@ -2,6 +2,7 @@ package io.legado.app.model.analyzeRule import android.text.TextUtils.isEmpty import android.text.TextUtils.join +import androidx.annotation.Keep import io.legado.app.utils.splitNotBlank import org.jsoup.Jsoup import org.jsoup.nodes.Element @@ -15,7 +16,7 @@ import java.util.* * Created by GKF on 2018/1/25. * 书源规则解析 */ - +@Keep class AnalyzeByJSoup { private var element: Element? = null diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByRegex.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByRegex.kt index 5475df744..05851b423 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByRegex.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByRegex.kt @@ -1,8 +1,10 @@ package io.legado.app.model.analyzeRule +import androidx.annotation.Keep import java.util.* import java.util.regex.Pattern +@Keep object AnalyzeByRegex { fun getElement(res: String, regs: Array, index: Int = 0): List? { diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt index 707ab9a22..52f3b7560 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt @@ -1,6 +1,7 @@ package io.legado.app.model.analyzeRule import android.text.TextUtils +import androidx.annotation.Keep import io.legado.app.utils.splitNotBlank import org.jsoup.nodes.Document import org.jsoup.nodes.Element @@ -9,6 +10,7 @@ import org.seimicrawler.xpath.JXDocument import org.seimicrawler.xpath.JXNode import java.util.* +@Keep class AnalyzeByXPath { private var jxDocument: JXDocument? = null private var jxNode: JXNode? = null diff --git a/app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt b/app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt index a9c193545..b06950031 100644 --- a/app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt +++ b/app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt @@ -1,5 +1,6 @@ package io.legado.app.model.rss +import androidx.annotation.Keep import io.legado.app.App import io.legado.app.R import io.legado.app.data.entities.RssArticle @@ -8,6 +9,7 @@ import io.legado.app.model.Debug import io.legado.app.model.analyzeRule.AnalyzeRule import io.legado.app.utils.NetworkUtils +@Keep object RssParserByRule { @Throws(Exception::class)