Skip to content

Commit adf9b2a

Browse files
committed
Update Android config to remove rubicon dependencies.
1 parent a3656e7 commit adf9b2a

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ requires = [
103103
"tzdata",
104104
]
105105

106+
base_theme = "Theme.MaterialComponents.Light.DarkActionBar"
107+
108+
build_gradle_dependencies = [
109+
"com.google.android.material:material:1.11.0",
110+
]
111+
106112
# support_package = "../Python-Android-support/dist/Python-3.13-Android-support.custom.zip"
107113
# template = "../../templates/briefcase-Android-gradle-template"
108114

src/testbed/android.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
######################################################################
22
# Android App configuration
33
#######################################################################
4-
from rubicon.java import JavaClass, JavaInterface
4+
from java import dynamic_proxy
5+
from org.beeware.android import IPythonApp, MainActivity
56

6-
# The Android cookiecutter template creates an app whose main Activity is
7-
# called `MainActivity`. The activity assumes that we will store a reference
8-
# to an implementation/subclass of `IPythonApp` in it.
9-
MainActivity = JavaClass("org/beeware/android/MainActivity")
107

11-
# The `IPythonApp` interface in Java allows Python code to
12-
# run on Android activity lifecycle hooks such as `onCreate()`.
13-
IPythonApp = JavaInterface("org/beeware/android/IPythonApp")
14-
15-
16-
class PythonApp(IPythonApp):
8+
class PythonApp(dynamic_proxy(IPythonApp)):
179
def __init__(self, app):
1810
super().__init__()
1911
self._impl = app

tests/test_android.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
def test_ctypes():
1313
"The FFI module has been compiled, and ctypes works on Java objects"
14-
from rubicon.java import JavaClass
15-
16-
URL = JavaClass("java/net/URL")
14+
from java.net import URL
1715

1816
sample_url = URL("https://beeware.org/contributing")
1917

0 commit comments

Comments
 (0)