File tree Expand file tree Collapse file tree 6 files changed +23
-21
lines changed
src/main/java/com/openwebgal/demo Expand file tree Collapse file tree 6 files changed +23
-21
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ jobs:
1212 runs-on : ubuntu-latest
1313
1414 steps :
15- - uses : actions/checkout@v3
16- - name : set up JDK 17
17- uses : actions/setup-java@v3
15+ - uses : actions/checkout@v4
16+ - name : set up JDK 21
17+ uses : actions/setup-java@v4
1818 with :
19- java-version : ' 17'
2019 distribution : ' temurin'
20+ java-version : ' 21'
2121 cache : gradle
2222 - name : Replace the demo link
2323 run : sed -i 's/https:\/\/appassets.androidplatform.net\/assets\/webgal\/index.html/https:\/\/demo.openwebgal.com\//g' app/src/main/res/values/values.xml
3030 - name : Rename debug apk
3131 run : mv app/build/outputs/apk/debug/app-debug.apk webgal-$GITHUB_RUN_NUMBER-debug.apk
3232 - name : Upload debug apk
33- uses : actions/upload-artifact@v3
33+ uses : actions/upload-artifact@v4
3434 with :
3535 name : webgal-${{ github.run_number }}-debug.apk
3636 path : webgal-${{ github.run_number }}-debug.apk
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ plugins {
55
66android {
77 namespace ' com.openwebgal.demo'
8- compileSdk 34
8+ compileSdk 35
99
1010 defaultConfig {
1111 applicationId " com.openwebgal.demo"
@@ -42,13 +42,13 @@ android {
4242
4343dependencies {
4444
45- implementation ' androidx.core:core-ktx:1.12 .0'
46- implementation ' androidx.appcompat:appcompat:1.6.1 '
47- implementation ' com.google.android.material:material:1.10 .0'
48- implementation ' androidx.constraintlayout:constraintlayout:2.1.4 '
49- implementation ' androidx.webkit:webkit:1.8 .0'
50- implementation ' androidx.browser:browser:1.6 .0'
45+ implementation ' androidx.core:core-ktx:1.15 .0'
46+ implementation ' androidx.appcompat:appcompat:1.7.0 '
47+ implementation ' com.google.android.material:material:1.12 .0'
48+ implementation ' androidx.constraintlayout:constraintlayout:2.2.1 '
49+ implementation ' androidx.webkit:webkit:1.13 .0'
50+ implementation ' androidx.browser:browser:1.8 .0'
5151 testImplementation ' junit:junit:4.13.2'
52- androidTestImplementation ' androidx.test.ext:junit:1.1.5 '
53- androidTestImplementation ' androidx.test.espresso:espresso-core:3.5 .1'
52+ androidTestImplementation ' androidx.test.ext:junit:1.2.1 '
53+ androidTestImplementation ' androidx.test.espresso:espresso-core:3.6 .1'
5454}
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ import androidx.browser.customtabs.CustomTabsIntent
2020import androidx.webkit.WebViewAssetLoader
2121import androidx.webkit.WebViewAssetLoader.AssetsPathHandler
2222import androidx.webkit.WebViewClientCompat
23+ import androidx.core.graphics.createBitmap
24+ import androidx.core.net.toUri
2325
2426class MainActivity : AppCompatActivity () {
2527
@@ -55,7 +57,8 @@ class MainActivity : AppCompatActivity() {
5557 webView : WebView ,
5658 request : WebResourceRequest
5759 ): WebResourceResponse ? {
58- val interceptedRequest = assetLoader.shouldInterceptRequest(Uri .parse(Uri .decode(request.url.toString())))
60+ val interceptedRequest = assetLoader.shouldInterceptRequest(
61+ Uri .decode(request.url.toString()).toUri())
5962 interceptedRequest?.let {
6063 if (request.url.toString().endsWith(" js" , true )) {
6164 it.mimeType = " text/javascript"
@@ -97,7 +100,7 @@ class MainActivity : AppCompatActivity() {
97100
98101 // 移除默认播放海报
99102 override fun getDefaultVideoPoster (): Bitmap ? {
100- return Bitmap . createBitmap(10 , 10 , Bitmap . Config . ARGB_8888 )
103+ return createBitmap(10 , 10 )
101104 }
102105 }
103106 }
Original file line number Diff line number Diff line change 11// Top-level build file where you can add configuration options common to all sub-projects/modules.
22plugins {
3- id ' com.android.application' version ' 8.2 .0' apply false
4- id ' com.android.library' version ' 8.2 .0' apply false
5- id ' org.jetbrains.kotlin.android' version ' 1.8.0 ' apply false
3+ id ' com.android.application' version ' 8.9 .0' apply false
4+ id ' com.android.library' version ' 8.9 .0' apply false
5+ id ' org.jetbrains.kotlin.android' version ' 2.1.10 ' apply false
66}
Original file line number Diff line number Diff line change @@ -21,5 +21,4 @@ kotlin.code.style=official
2121# resources declared in the library itself and none from the library's dependencies,
2222# thereby reducing the size of the R class for that library
2323android.nonTransitiveRClass =true
24- android.defaults.buildfeatures.buildconfig =true
2524android.nonFinalResIds =false
Original file line number Diff line number Diff line change 11# Fri Feb 03 09:54:54 CST 2023
22distributionBase =GRADLE_USER_HOME
3- distributionUrl =https\://services.gradle.org/distributions/gradle-8.2 -bin.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.11.1 -bin.zip
44distributionPath =wrapper/dists
55zipStorePath =wrapper/dists
66zipStoreBase =GRADLE_USER_HOME
You can’t perform that action at this time.
0 commit comments