Skip to content

Commit 6e22e7c

Browse files
Merge branch 'main' into Remove_Date
# Conflicts: # app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.kt # app/src/main/java/org/wikipedia/suggestededits/SuggestedEditsRecentEditsViewModel.kt # app/src/main/java/org/wikipedia/suggestededits/provider/EditingSuggestionsProvider.kt # app/src/main/java/org/wikipedia/usercontrib/UserInformationDialogViewModel.kt # app/src/main/java/org/wikipedia/views/EditHistoryStatsView.kt
2 parents 2666804 + 60da647 commit 6e22e7c

File tree

451 files changed

+23585
-6548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+23585
-6548
lines changed

.github/workflows/android.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- uses: actions/setup-java@v3
12+
- uses: actions/setup-java@v4
1313
with:
1414
distribution: 'temurin'
1515
java-version: '17'
16-
- uses: gradle/gradle-build-action@v2
16+
- uses: gradle/gradle-build-action@v3
1717
- name: Check for missing qq strings
1818
run: ./scripts/missing-qq.py
1919
- name: Checkout submodules
@@ -38,7 +38,7 @@ jobs:
3838
run: git rev-parse HEAD > app/build/outputs/apk/alpha/release/rev-hash.txt
3939
- name: Rename APK to universal
4040
run: mv app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk app/build/outputs/apk/alpha/release/app-alpha-universal-release.apk
41-
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
41+
- uses: dev-drprasad/delete-tag-and-release@v1.1
4242
name: Delete latest alpha tag and release
4343
with:
4444
tag_name: latest
@@ -47,7 +47,7 @@ jobs:
4747
- name: Sleep for 30 seconds, to allow the tag to be deleted
4848
run: sleep 30s
4949
shell: bash
50-
- uses: ncipollo/release-action@v1.12.0
50+
- uses: ncipollo/release-action@v1.14.0
5151
name: Create new tag and release and upload artifacts
5252
with:
5353
name: latest

.github/workflows/android_branch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: actions/setup-java@v3
13+
- uses: actions/setup-java@v4
1414
with:
1515
distribution: 'temurin'
1616
java-version: '17'
17-
- uses: gradle/gradle-build-action@v2
17+
- uses: gradle/gradle-build-action@v3
1818
- name: Checkout submodules
1919
run: git submodule update --init --recursive
2020
- name: Build, test, and lint
@@ -33,7 +33,7 @@ jobs:
3333
env:
3434
# override default build-tools version (29.0.3) -- optional
3535
BUILD_TOOLS_VERSION: "34.0.0"
36-
- uses: actions/upload-artifact@v3
36+
- uses: actions/upload-artifact@v4
3737
name: Upload APK artifact
3838
with:
3939
name: app_alpha_release

.github/workflows/android_phab.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Post to Phabricator
2+
3+
on:
4+
pull_request:
5+
types: [opened, closed]
6+
7+
jobs:
8+
post_to_phab:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Post to Phabricator when pull request is opened or closed
12+
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'closed') }}
13+
env:
14+
PR_BODY: ${{ github.event.pull_request.body }}
15+
run: |
16+
message="${{ github.actor }} ${{ github.event.action }} ${{ github.event.pull_request._links.html.href }}"
17+
echo -e "${PR_BODY}" | grep -oEi "(^Bug:\s*T[0-9]+)|(^([*]*phabricator[*]*:[*]*\s*)?https:\/\/phabricator\.wikimedia\.org\/T[0-9]+)" | grep -oEi "T[0-9]+" | while IFS= read -r line; do
18+
echo "Processing: $line"
19+
curl https://phabricator.wikimedia.org/api/maniphest.edit \
20+
-d api.token=${{ secrets.PHAB_BOT_API_KEY }} \
21+
-d transactions[0][type]=comment \
22+
-d transactions[0][value]="${message}" \
23+
-d objectIdentifier=${line}
24+
done

.github/workflows/android_pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: gradle/wrapper-validation-action@v1
14-
- uses: actions/setup-java@v3
13+
- uses: gradle/actions/wrapper-validation@v3
14+
- uses: actions/setup-java@v4
1515
with:
1616
distribution: 'temurin'
1717
java-version: '17'
18-
- uses: gradle/gradle-build-action@v2
18+
- uses: gradle/gradle-build-action@v3
1919
- name: Check for missing qq strings
2020
run: ./scripts/missing-qq.py
2121
- name: Build, test, and lint

.github/workflows/android_smoke_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v4
15-
- uses: actions/setup-java@v3
15+
- uses: actions/setup-java@v4
1616
with:
1717
distribution: 'temurin'
1818
java-version: '17'
19-
- uses: gradle/gradle-build-action@v2
19+
- uses: gradle/gradle-build-action@v3
2020

2121
- name: Instrumentation Tests
2222
uses: reactivecircus/android-emulator-runner@v2
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Upload results
2828
if: ${{ always() }}
29-
uses: actions/upload-artifact@v3
29+
uses: actions/upload-artifact@v4
3030
with:
3131
name: instrumentation-test-results ${{ matrix.api-level }}
3232
path: ./**/build/reports/androidTests/connected/**

.mailmap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# See: https://git-scm.com/docs/git-shortlog#_mapping_authors
2+
#
3+
Brooke Vibber <[email protected]>
4+
5+

app/build.gradle

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ android {
3737
applicationId 'org.wikipedia'
3838
minSdk 21
3939
targetSdk 34
40-
versionCode 50467
40+
versionCode 50485
4141
testApplicationId 'org.wikipedia.test'
4242
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4343
testInstrumentationRunnerArguments clearPackageData: 'true'
@@ -65,13 +65,16 @@ android {
6565
buildConfig true
6666
}
6767

68+
androidResources {
69+
generateLocaleConfig = true
70+
}
71+
6872
sourceSets {
6973

70-
prod { java.srcDirs += 'src/extra/java' }
71-
beta { java.srcDirs += 'src/extra/java' }
72-
alpha { java.srcDirs += 'src/extra/java' }
73-
dev { java.srcDirs += 'src/extra/java' }
74-
custom { java.srcDirs += 'src/extra/java' }
74+
[ prod, beta, alpha, dev, custom ].forEach {
75+
it.java.srcDirs += 'src/extra/java'
76+
it.res.srcDirs += 'src/extra/res'
77+
}
7578

7679
androidTest {
7780
assets.srcDirs += files("$projectDir/schemas".toString())
@@ -169,17 +172,18 @@ dependencies {
169172
// Debug with ./gradlew -q app:dependencies --configuration compile
170173

171174
String okHttpVersion = '4.12.0'
172-
String retrofitVersion = '2.9.0'
175+
String retrofitVersion = '2.11.0'
173176
String glideVersion = '4.16.0'
174177
String mockitoVersion = '5.2.0'
175-
String leakCanaryVersion = '2.13'
176-
String kotlinCoroutinesVersion = '1.7.3'
177-
String firebaseMessagingVersion = '23.4.0'
178-
String mlKitVersion = '17.0.4'
178+
String leakCanaryVersion = '2.14'
179+
String kotlinCoroutinesVersion = '1.8.0'
180+
String firebaseMessagingVersion = '23.4.1'
181+
String mlKitVersion = '17.0.5'
182+
String googlePayVersion = '19.3.0'
179183
String roomVersion = "2.6.1"
180184
String espressoVersion = '3.5.1'
181-
String serialization_version = '1.6.2'
182-
String metricsVersion = '2.1'
185+
String serialization_version = '1.6.3'
186+
String metricsVersion = '2.4'
183187

184188
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
185189

@@ -190,8 +194,8 @@ dependencies {
190194

191195
implementation "com.google.android.material:material:1.11.0"
192196
implementation 'androidx.appcompat:appcompat:1.6.1'
193-
implementation "androidx.core:core-ktx:1.12.0"
194-
implementation "androidx.browser:browser:1.7.0"
197+
implementation "androidx.core:core-ktx:1.13.0"
198+
implementation "androidx.browser:browser:1.8.0"
195199
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
196200
implementation "androidx.fragment:fragment-ktx:1.6.2"
197201
implementation "androidx.paging:paging-runtime-ktx:3.2.1"
@@ -213,6 +217,7 @@ dependencies {
213217
implementation "com.github.bumptech.glide:okhttp3-integration:$glideVersion"
214218
ksp "com.github.bumptech.glide:ksp:$glideVersion"
215219

220+
implementation "com.squareup.okhttp3:okhttp-tls:$okHttpVersion"
216221
implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
217222
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
218223
implementation "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion"
@@ -224,6 +229,9 @@ dependencies {
224229
implementation 'com.github.skydoves:balloon:1.6.4'
225230
implementation "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0"
226231

232+
implementation 'org.maplibre.gl:android-sdk:10.3.0'
233+
implementation 'org.maplibre.gl:android-plugin-annotation-v9:2.0.2'
234+
227235
implementation("androidx.room:room-runtime:$roomVersion")
228236
annotationProcessor "androidx.room:room-compiler:$roomVersion"
229237
ksp "androidx.room:room-compiler:$roomVersion"
@@ -244,12 +252,19 @@ dependencies {
244252
devImplementation "com.google.firebase:firebase-messaging-ktx:$firebaseMessagingVersion"
245253
customImplementation "com.google.firebase:firebase-messaging-ktx:$firebaseMessagingVersion"
246254

255+
// For integrating with Google Pay for donations
256+
prodImplementation "com.google.android.gms:play-services-wallet:$googlePayVersion"
257+
betaImplementation "com.google.android.gms:play-services-wallet:$googlePayVersion"
258+
alphaImplementation "com.google.android.gms:play-services-wallet:$googlePayVersion"
259+
devImplementation "com.google.android.gms:play-services-wallet:$googlePayVersion"
260+
customImplementation "com.google.android.gms:play-services-wallet:$googlePayVersion"
261+
247262
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
248263
implementation "com.squareup.leakcanary:plumber-android:$leakCanaryVersion"
249264

250265
testImplementation 'junit:junit:4.13.2'
251266
testImplementation "org.mockito:mockito-inline:$mockitoVersion"
252-
testImplementation 'org.robolectric:robolectric:4.11.1'
267+
testImplementation 'org.robolectric:robolectric:4.12.1'
253268
testImplementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
254269
testImplementation "com.squareup.okhttp3:mockwebserver:$okHttpVersion"
255270
testImplementation 'org.hamcrest:hamcrest:2.2'
@@ -260,7 +275,7 @@ dependencies {
260275
androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
261276
androidTestImplementation "androidx.test.espresso:espresso-web:$espressoVersion"
262277
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
263-
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
278+
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.3.0'
264279
androidTestImplementation "androidx.room:room-testing:$roomVersion"
265280
androidTestUtil 'androidx.test:orchestrator:1.4.2'
266281
}

app/src/androidTest/java/org/wikipedia/TestUtil.kt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@ import android.view.View
55
import android.view.ViewGroup
66
import androidx.annotation.ColorInt
77
import androidx.test.espresso.Espresso.onView
8+
import androidx.test.espresso.NoMatchingViewException
89
import androidx.test.espresso.UiController
910
import androidx.test.espresso.ViewAction
10-
import androidx.test.espresso.action.*
11+
import androidx.test.espresso.ViewInteraction
12+
import androidx.test.espresso.action.CoordinatesProvider
13+
import androidx.test.espresso.action.GeneralLocation
14+
import androidx.test.espresso.action.GeneralSwipeAction
15+
import androidx.test.espresso.action.Press
16+
import androidx.test.espresso.action.Swipe
17+
import androidx.test.espresso.action.ViewActions
18+
import androidx.test.espresso.assertion.ViewAssertions.matches
19+
import androidx.test.espresso.matcher.ViewMatchers
1120
import androidx.test.espresso.matcher.ViewMatchers.isRoot
1221
import androidx.test.platform.app.InstrumentationRegistry
1322
import androidx.test.uiautomator.By
@@ -27,6 +36,15 @@ object TestUtil {
2736
return WithGrandparentMatcher(grandparentMatcher)
2837
}
2938

39+
fun ViewInteraction.isDisplayed(): Boolean {
40+
return try {
41+
check(matches(ViewMatchers.isDisplayed()))
42+
true
43+
} catch (e: NoMatchingViewException) {
44+
false
45+
}
46+
}
47+
3048
fun isNotVisible(): Matcher<View> {
3149
return IsNotVisibleMatcher()
3250
}

0 commit comments

Comments
 (0)