diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e2253bce..d8f74abfd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v3 with: - cmdline-tools-version: 11076708 + cmdline-tools-version: 12266719 log-accepted-android-sdk-licenses: false - name: Build Project run: ./gradlew assemble${{ inputs.build_type }} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e6fd217b2..e98880683 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -15,7 +15,7 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v3 with: - cmdline-tools-version: 11076708 + cmdline-tools-version: 12266719 log-accepted-android-sdk-licenses: false - name: Check Code Format run: ./gradlew checkFormat diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c93b316b1..43ec03f8e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v3 with: - cmdline-tools-version: 11076708 + cmdline-tools-version: 12266719 log-accepted-android-sdk-licenses: false - name: Lint checks run: ./gradlew lint${{ inputs.build_type }} diff --git a/build.gradle b/build.gradle index a1ff460bb..a4e7c261e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,16 @@ plugins { - id 'com.android.application' version '8.1.2' apply false - id 'com.android.library' version '8.1.2' apply false + id 'com.android.application' version '8.7.3' apply false + id 'com.android.library' version '8.7.3' apply false id 'org.jetbrains.kotlin.android' version '1.8.0' apply false } tasks.register("clean", Delete) { - delete rootProject.buildDir + delete rootProject.layout.buildDirectory delete file(".git/hooks/pre-commit") } def installQATools = tasks.register("installQATools", Exec) { - def cacheFile = new File(rootProject.buildDir, ".qaToolsInstalled") + def cacheFile = rootProject.layout.buildDirectory.file(".qaToolsInstalled").get().asFile outputs.file(cacheFile) commandLine "python3", "-m", "pip", "install", "--upgrade", "editorconfig-checker", "pycodestyle", "cmakelang" doLast { diff --git a/tools/mediaplayer/src/main/AndroidManifest.xml b/tools/mediaplayer/src/main/AndroidManifest.xml index 5c1039934..d960d45e2 100644 --- a/tools/mediaplayer/src/main/AndroidManifest.xml +++ b/tools/mediaplayer/src/main/AndroidManifest.xml @@ -10,8 +10,7 @@ + android:launchMode="singleInstance"> diff --git a/tools/mediaplayer/src/main/java/org/wpewebkit/tools/mediaplayer/MainActivity.java b/tools/mediaplayer/src/main/java/org/wpewebkit/tools/mediaplayer/MainActivity.java index 12a9135fc..eb2563e78 100644 --- a/tools/mediaplayer/src/main/java/org/wpewebkit/tools/mediaplayer/MainActivity.java +++ b/tools/mediaplayer/src/main/java/org/wpewebkit/tools/mediaplayer/MainActivity.java @@ -19,6 +19,7 @@ package org.wpewebkit.tools.mediaplayer; +import android.content.pm.ActivityInfo; import android.content.res.AssetManager; import android.os.Bundle; import android.util.Log; @@ -53,6 +54,10 @@ private String getHtmlContent() throws IOException { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + // Lock the orientation to landscape + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + setContentView(R.layout.main); try { diff --git a/tools/minibrowser/build.gradle b/tools/minibrowser/build.gradle index 2ddc19f88..776032971 100644 --- a/tools/minibrowser/build.gradle +++ b/tools/minibrowser/build.gradle @@ -1,7 +1,7 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' version '1.8.0' - id 'androidx.navigation.safeargs' version '2.5.3' + id 'androidx.navigation.safeargs' version '2.8.5' } android { @@ -44,12 +44,12 @@ android { dependencies { implementation project(':wpeview') - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.10.0' - implementation 'androidx.core:core-ktx:1.12.0' - implementation 'androidx.fragment:fragment-ktx:1.6.1' - implementation 'androidx.navigation:navigation-fragment-ktx:2.7.4' - implementation 'androidx.navigation:navigation-ui-ktx:2.7.4' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' + implementation 'androidx.core:core-ktx:1.15.0' + implementation 'androidx.fragment:fragment-ktx:1.8.5' + implementation 'androidx.navigation:navigation-fragment-ktx:2.8.5' + implementation 'androidx.navigation:navigation-ui-ktx:2.8.5' implementation 'androidx.preference:preference-ktx:1.2.1' modules { diff --git a/tools/webdriver/build.gradle b/tools/webdriver/build.gradle index bd798543e..78acd6acf 100644 --- a/tools/webdriver/build.gradle +++ b/tools/webdriver/build.gradle @@ -41,13 +41,13 @@ android { dependencies { implementation project(':wpeview') - implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.10.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'androidx.core:core-ktx:1.15.0' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.0' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' modules { module("org.jetbrains.kotlin:kotlin-stdlib-jdk7") { diff --git a/wpeview/build.gradle b/wpeview/build.gradle index 2302d75d1..111a8ba91 100644 --- a/wpeview/build.gradle +++ b/wpeview/build.gradle @@ -18,9 +18,6 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } - lintOptions { - disable 'ChromeOsAbiSupport' - } buildTypes { release { @@ -51,24 +48,31 @@ android { buildFeatures { aidl true } + lint { + disable 'ChromeOsAbiSupport' + } - libraryVariants.all { variant -> - def genDir = new File(project.buildDir, "generated/source/services/${variant.name}") + libraryVariants.configureEach { variant -> + def genDir = project.layout.buildDirectory.dir("generated/source/services/${variant.name}").get().asFile - def wpeGenServicesTask = tasks.create("wpeGenServices${variant.name.capitalize()}").doLast({ - def templateFileContent = file("src/main/java/org/wpewebkit/wpe/services/WPEServices.java.template").getText() - def services = "" - for (int i = 0; i < NUMBER_OF_AUX_PROCESSES; ++i) { - services += " public static final class WebProcessService$i extends WebProcessService {}\n" + - " public static final class NetworkProcessService$i extends NetworkProcessService {}\n" - } - templateFileContent = templateFileContent.replace(" // SERVICES PLACEHOLDER", services) + def wpeGenServicesTask = tasks.register("wpeGenServices${variant.name.capitalize()}") { + doLast { + def templateFileContent = file("src/main/java/org/wpewebkit/wpe/services/WPEServices.java.template").getText() + def services = "" + for (int i = 0; i < NUMBER_OF_AUX_PROCESSES; ++i) { + services += " public static final class WebProcessService$i extends WebProcessService {}\n" + + " public static final class NetworkProcessService$i extends NetworkProcessService {}\n" + } + templateFileContent = templateFileContent.replace(" // SERVICES PLACEHOLDER", services) - def servicesDir = new File(genDir, "org/wpewebkit/wpe/services") - servicesDir.mkdirs() - new File(servicesDir, "WPEServices.java").write(templateFileContent) - }) - wpeGenServicesTask.description = "Generate the code for multiple WPE auxiliary services" + def servicesDir = new File(genDir, "org/wpewebkit/wpe/services") + servicesDir.mkdirs() + new File(servicesDir, "WPEServices.java").write(templateFileContent) + } + } + wpeGenServicesTask.configure { + description = "Generate the code for multiple WPE auxiliary services" + } variant.registerJavaGeneratingTask(wpeGenServicesTask, genDir) variant.outputs.all { output -> @@ -88,14 +92,14 @@ android { } manifestContent = manifestContent.replace(" ", services) manifestFile.write(manifestContent) - logger.info(manifestContent) + project.logger.info(manifestContent) }) } } } dependencies { - implementation 'androidx.annotation:annotation:1.8.2' + implementation 'androidx.annotation:annotation:1.9.1' androidTestImplementation "androidx.test:runner:1.6.2" androidTestImplementation "androidx.test:rules:1.6.1" androidTestImplementation "androidx.test.ext:junit:1.2.1" diff --git a/wpeview/src/androidTest/AndroidManifest.xml b/wpeview/src/androidTest/AndroidManifest.xml new file mode 100644 index 000000000..fcc16d2c1 --- /dev/null +++ b/wpeview/src/androidTest/AndroidManifest.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/wpeview/src/main/AndroidManifest.xml b/wpeview/src/main/AndroidManifest.xml index f2c8ad12c..0988b73e4 100644 --- a/wpeview/src/main/AndroidManifest.xml +++ b/wpeview/src/main/AndroidManifest.xml @@ -4,16 +4,6 @@ - - - - - - - -