From a3656e78b8ae198c00dc3f7955cd396299e02037 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 20:47:51 +0000 Subject: [PATCH 1/2] Bump actions/checkout from 4.1.7 to 4.2.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.7...v4.2.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81ca9f1..4abd4d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,7 +125,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.7 + uses: actions/checkout@v4.2.0 with: fetch-depth: 0 From adf9b2abc098f02e68bde5f3570466b26a2f3b27 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 30 Sep 2024 08:54:56 +0800 Subject: [PATCH 2/2] Update Android config to remove rubicon dependencies. --- pyproject.toml | 6 ++++++ src/testbed/android.py | 14 +++----------- tests/test_android.py | 4 +--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 128b934..e88b534 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,6 +103,12 @@ requires = [ "tzdata", ] +base_theme = "Theme.MaterialComponents.Light.DarkActionBar" + +build_gradle_dependencies = [ + "com.google.android.material:material:1.11.0", +] + # support_package = "../Python-Android-support/dist/Python-3.13-Android-support.custom.zip" # template = "../../templates/briefcase-Android-gradle-template" diff --git a/src/testbed/android.py b/src/testbed/android.py index b04ade5..ef10c59 100644 --- a/src/testbed/android.py +++ b/src/testbed/android.py @@ -1,19 +1,11 @@ ###################################################################### # Android App configuration ####################################################################### -from rubicon.java import JavaClass, JavaInterface +from java import dynamic_proxy +from org.beeware.android import IPythonApp, MainActivity -# The Android cookiecutter template creates an app whose main Activity is -# called `MainActivity`. The activity assumes that we will store a reference -# to an implementation/subclass of `IPythonApp` in it. -MainActivity = JavaClass("org/beeware/android/MainActivity") -# The `IPythonApp` interface in Java allows Python code to -# run on Android activity lifecycle hooks such as `onCreate()`. -IPythonApp = JavaInterface("org/beeware/android/IPythonApp") - - -class PythonApp(IPythonApp): +class PythonApp(dynamic_proxy(IPythonApp)): def __init__(self, app): super().__init__() self._impl = app diff --git a/tests/test_android.py b/tests/test_android.py index b7dfd13..bd30341 100644 --- a/tests/test_android.py +++ b/tests/test_android.py @@ -11,9 +11,7 @@ def test_ctypes(): "The FFI module has been compiled, and ctypes works on Java objects" - from rubicon.java import JavaClass - - URL = JavaClass("java/net/URL") + from java.net import URL sample_url = URL("https://beeware.org/contributing")