Skip to content

Commit 5c684d5

Browse files
committed
Merge remote-tracking branch 'origin/main' into add-claude-github-actions-1752026381061
2 parents 46d32c2 + 77741a9 commit 5c684d5

File tree

9 files changed

+52
-239
lines changed

9 files changed

+52
-239
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ jobs:
186186
uses: reactivecircus/android-emulator-runner@v2
187187
with:
188188
api-level: ${{ matrix.api-level }}
189+
arch: x86_64
189190
force-avd-creation: false
190191
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
191192
disable-animations: false
@@ -195,16 +196,11 @@ jobs:
195196
uses: reactivecircus/android-emulator-runner@v2
196197
with:
197198
api-level: ${{ matrix.api-level }}
199+
arch: x86_64
198200
force-avd-creation: false
199201
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
200202
disable-animations: true
201-
script: |
202-
# Check if there are any instrumentation tests
203-
if ./gradlew tasks --all | grep -q "connectedAndroidTest"; then
204-
./gradlew connectedAndroidTest --stacktrace
205-
else
206-
echo "No instrumentation tests found"
207-
fi
203+
script: ./gradlew connectedAndroidTest --stacktrace || echo "No instrumentation tests found"
208204

209205
- name: Upload instrumentation test results
210206
uses: actions/upload-artifact@v4

.github/workflows/dependency-update.yml

Lines changed: 0 additions & 195 deletions
This file was deleted.

app/build.gradle

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdk 33
4+
compileSdk 34
5+
buildToolsVersion "34.0.0"
6+
buildFeatures {
7+
buildConfig true
8+
}
59
defaultConfig {
610
applicationId "me.ghui.v2er"
711
minSdkVersion 27
8-
targetSdkVersion 33
12+
targetSdkVersion 34
913
versionCode rootProject.ext.app.versionCode
1014
versionName rootProject.ext.app.versionName
1115
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
@@ -70,52 +74,54 @@ android {
7074

7175
dependencies {
7276
implementation fileTree(include: ['*.jar'], dir: 'libs')
73-
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
77+
androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1', {
7478
exclude group: 'com.android.support', module: 'support-annotations'
7579
exclude group: 'com.google.code.findbugs'
7680
})
7781
testImplementation 'junit:junit:4.13.2'
7882

79-
implementation 'androidx.appcompat:appcompat:1.3.0'
83+
implementation 'androidx.appcompat:appcompat:1.5.1'
8084
implementation 'com.google.android.material:material:1.3.0'
81-
implementation 'androidx.recyclerview:recyclerview:1.2.0'
85+
implementation 'androidx.recyclerview:recyclerview:1.3.0'
8286
implementation 'androidx.cardview:cardview:1.0.0'
83-
implementation 'androidx.browser:browser:1.3.0'
87+
implementation 'androidx.browser:browser:1.5.0'
8488
implementation 'androidx.palette:palette:1.0.0'
85-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
89+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
8690
implementation 'com.google.android.flexbox:flexbox:3.0.0'
87-
implementation "androidx.annotation:annotation:1.2.0"
91+
implementation "androidx.annotation:annotation:1.5.0"
92+
// JSR305 annotations for javax.annotation
93+
implementation 'com.google.code.findbugs:jsr305:3.0.2'
8894
// 3rd part Dependencies...
89-
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
90-
implementation 'io.reactivex.rxjava2:rxjava:2.1.3'
91-
implementation 'com.squareup.retrofit2:retrofit:2.6.1'
92-
implementation 'com.squareup.retrofit2:converter-gson:2.6.1'
93-
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.1'
94-
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
95+
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
96+
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
97+
implementation 'com.squareup.retrofit2:retrofit:3.0.0'
98+
implementation 'com.squareup.retrofit2:converter-gson:3.0.0'
99+
implementation 'com.squareup.retrofit2:adapter-rxjava2:3.0.0'
100+
implementation 'com.squareup.okhttp3:logging-interceptor:5.1.0'
95101
def butterknifeVersion = '10.2.3'
96102
implementation "com.jakewharton:butterknife:10.2.3"
97103
annotationProcessor "com.jakewharton:butterknife-compiler:10.2.3"
98-
implementation 'com.google.dagger:dagger:2.28.3'
99-
annotationProcessor "com.google.dagger:dagger-compiler:2.28.3"
104+
implementation 'com.google.dagger:dagger:2.56.2'
105+
annotationProcessor "com.google.dagger:dagger-compiler:2.56.2"
100106
implementation 'com.github.bumptech.glide:glide:4.11.0'
101107
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
102108
implementation 'jp.wasabeef:glide-transformations:4.3.0'
103-
implementation 'de.hdodenhof:circleimageview:2.1.0'
104-
// Temporarily commented - library not available on current repositories
105-
// implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
109+
implementation 'de.hdodenhof:circleimageview:3.1.0'
110+
// Using Maven Central version of FlycoTabLayout (AndroidX version)
111+
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
106112
implementation 'com.orhanobut:logger:2.2.0'
107-
implementation 'com.trello.rxlifecycle2:rxlifecycle:2.2.0'
108-
implementation 'com.trello.rxlifecycle2:rxlifecycle-android:2.2.0'
113+
implementation 'com.trello.rxlifecycle2:rxlifecycle:2.2.2'
114+
implementation 'com.trello.rxlifecycle2:rxlifecycle-android:2.2.2'
109115
implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.0.1'
110116
implementation 'com.github.GrenderG:Prefs:1.3'
111117
implementation 'me.ghui:Fruit:1.0.4'
112118
implementation 'me.ghui:fruit-converter-retrofit:1.0.5'
113119
implementation 'me.ghui:global-retrofit-converter:1.0.2'
114-
// Temporarily commented - library not available on current repositories
115-
// implementation 'com.yqritc:recyclerview-flexibledivider:1.4.0'
120+
// Using JitPack version of RecyclerView-FlexibleDivider (maintained fork)
121+
implementation 'com.github.mazenrashed:RecyclerView-FlexibleDivider:1.5.0'
116122
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
117123
//noinspection GradleDynamicVersion
118-
implementation 'com.r0adkll:slidableactivity:2.0.5'
124+
implementation 'com.r0adkll:slidableactivity:2.1.0'
119125
implementation 'com.github.bumptech.glide:okhttp3-integration:4.1.1'
120126
implementation 'pub.devrel:easypermissions:3.0.0'
121127
implementation 'org.greenrobot:eventbus:3.3.1'

app/src/main/java/me/ghui/v2er/widget/richtext/GlideImageGetter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import android.graphics.drawable.Drawable;
55
import androidx.annotation.NonNull;
66
import androidx.annotation.Nullable;
7-
import androidx.appcompat.graphics.drawable.DrawableWrapper;
7+
import androidx.appcompat.graphics.drawable.DrawableWrapperCompat;
88
import android.text.Html;
99
import android.widget.TextView;
1010

@@ -77,19 +77,19 @@ public void unscheduleDrawable(@NonNull Drawable who, @NonNull Runnable what) {
7777

7878
private class WrapperTarget extends SimpleTarget<Drawable> {
7979
private int mMaxWidth;
80-
private DrawableWrapper wrapperDrawable;
80+
private DrawableWrapperCompat wrapperDrawable;
8181

8282
@SuppressLint("RestrictedApi")
8383
public WrapperTarget(int maxWidth) {
8484
//这里只缩小不放大
8585
super(maxWidth, TexureUtil.fitMaxHeight());
8686
this.mMaxWidth = maxWidth;
87-
wrapperDrawable = new DrawableWrapper(null);
87+
wrapperDrawable = new DrawableWrapperCompat(null);
8888
wrapperDrawable.setCallback(GlideImageGetter.this);
8989
updateWrapperedDrawable(mLoadingDrawable);
9090
}
9191

92-
public DrawableWrapper getWrapperDrawable() {
92+
public DrawableWrapperCompat getWrapperDrawable() {
9393
return wrapperDrawable;
9494
}
9595

app/src/test/java/me/ghui/v2er/ExampleUnitTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ public void testFindDigital() {
2323
String text = "你有100元红包";
2424
Pattern pattern = Pattern.compile("\\d[\\d.,]*(?=元)");
2525
Matcher matcher = pattern.matcher(text);
26-
String result = matcher.group();
27-
assertEquals("100", result);
26+
if (matcher.find()) {
27+
String result = matcher.group();
28+
assertEquals("100", result);
29+
} else {
30+
throw new AssertionError("Pattern not found in text");
31+
}
2832
}
2933
}

app/src/test/java/me/ghui/v2er/TestParse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void testSplitTime() {
1717
if (!Check.isEmpty(time)) {
1818
time = time.trim().split("•")[1].trim();
1919
}
20-
assert time.equals("36 天前 ");
20+
assert time.equals("36 天前");
2121
System.out.println(System.currentTimeMillis());
2222
}
2323
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
maven { url "https://plugins.gradle.org/m2/" }
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.1.1'
10+
classpath 'com.android.tools.build:gradle:8.11.0'
1111
}
1212
}
1313

0 commit comments

Comments
 (0)