Skip to content

Commit 205bf1c

Browse files
authored
Merge pull request #51 from v2er-app/fix/dependency-migration
fix: Migrate deprecated dependencies to JitPack
2 parents fc4aed2 + 99665e9 commit 205bf1c

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
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

app/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ dependencies {
8585
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
8686
implementation 'com.google.android.flexbox:flexbox:3.0.0'
8787
implementation "androidx.annotation:annotation:1.2.0"
88+
// JSR305 annotations for javax.annotation
89+
implementation 'com.google.code.findbugs:jsr305:3.0.2'
8890
// 3rd part Dependencies...
8991
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
9092
implementation 'io.reactivex.rxjava2:rxjava:2.1.3'
@@ -101,8 +103,8 @@ dependencies {
101103
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
102104
implementation 'jp.wasabeef:glide-transformations:4.3.0'
103105
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'
106+
// Using Maven Central version of FlycoTabLayout (AndroidX version)
107+
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
106108
implementation 'com.orhanobut:logger:2.2.0'
107109
implementation 'com.trello.rxlifecycle2:rxlifecycle:2.2.0'
108110
implementation 'com.trello.rxlifecycle2:rxlifecycle-android:2.2.0'
@@ -111,8 +113,8 @@ dependencies {
111113
implementation 'me.ghui:Fruit:1.0.4'
112114
implementation 'me.ghui:fruit-converter-retrofit:1.0.5'
113115
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'
116+
// Using JitPack version of RecyclerView-FlexibleDivider (maintained fork)
117+
implementation 'com.github.mazenrashed:RecyclerView-FlexibleDivider:1.5.0'
116118
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
117119
//noinspection GradleDynamicVersion
118120
implementation 'com.r0adkll:slidableactivity:2.0.5'

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
}

0 commit comments

Comments
 (0)