Jelajahi Sumber

Merge pull request #3802 from gedoor/dependabot/gradle/org.jsoup-jsoup-1.17.2

- Bump org.jsoup:jsoup from 1.16.2 to 1.17.2
- Add missing proguard rules
-  Fix org/jsoup/nodes/Element Non Null
Xwite 2 tahun lalu
induk
melakukan
25308ed981

+ 2 - 1
.github/workflows/test.yml

@@ -120,7 +120,8 @@ jobs:
 
 
       - name: Check Build production
       - name: Check Build production
         run: |
         run: |
-          if [ ! -e "${{ github.workspace }}/apk/legado_*.apk" ]; then
+          cd ${{ github.workspace }}/apk/
+          if [ ! -e legado_*.apk ]; then
             echo "Build production not found! Check gradle logs."
             echo "Build production not found! Check gradle logs."
             exit 1
             exit 1
           fi
           fi

+ 4 - 0
app/proguard-rules.pro

@@ -403,6 +403,10 @@
 -dontwarn org.chromium.base.FeatureList
 -dontwarn org.chromium.base.FeatureList
 -dontwarn org.chromium.base.FeatureMap
 -dontwarn org.chromium.base.FeatureMap
 
 
+# Please add these rules to your existing keep rules in order to suppress warnings.
+# This is generated automatically by the Android Gradle plugin.
+-dontwarn org.jspecify.annotations.NullMarked
+
 #-------------------Cronet------------------------------------
 #-------------------Cronet------------------------------------
 
 
 # Class.forName调用
 # Class.forName调用

+ 3 - 2
app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt

@@ -375,11 +375,12 @@ class AnalyzeByJSoup(doc: Any) {
              * 根据索引集合筛选元素
              * 根据索引集合筛选元素
              * */
              * */
             if (split == '!') { //排除
             if (split == '!') { //排除
-
+                /*
                 for (pcInt in indexSet) elements[pcInt] = null
                 for (pcInt in indexSet) elements[pcInt] = null
 
 
                 elements.removeAll(nullSet) //测试过,这样就行
                 elements.removeAll(nullSet) //测试过,这样就行
-
+                */
+                for (pcInt in indexSet) elements[pcInt].remove()
             } else if (split == '.') { //选择
             } else if (split == '.') { //选择
 
 
                 val es = Elements()
                 val es = Elements()

+ 1 - 1
gradle/libs.versions.toml

@@ -20,7 +20,7 @@ lifecycle = "2.7.0"
 glide = "4.16.0"
 glide = "4.16.0"
 gson = "2.10.1"
 gson = "2.10.1"
 jsonPath = "2.9.0"
 jsonPath = "2.9.0"
-jsoup = "1.16.2"
+jsoup = "1.17.2"
 jsoupxpath = "2.5.3"
 jsoupxpath = "2.5.3"
 coroutines = "1.8.0"
 coroutines = "1.8.0"
 liveeventbus = "1.8.14"
 liveeventbus = "1.8.14"