From b55ad610950214d98d007f39728e78fbe888aac0 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 28 May 2024 10:59:54 +0800 Subject: [PATCH 1/5] Flag optional Toga gradle dependencies. --- src/briefcase/bootstraps/toga.py | 4 +++- tests/commands/new/test_build_context.py | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/briefcase/bootstraps/toga.py b/src/briefcase/bootstraps/toga.py index 1c6b486cc..31bc413a6 100644 --- a/src/briefcase/bootstraps/toga.py +++ b/src/briefcase/bootstraps/toga.py @@ -212,7 +212,9 @@ def pyproject_table_android(self): "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", # Needed for DetailedList - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", + # "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", + # Needed for MapView + # "org.osmdroid:osmdroid-android:6.1.0", ] """ diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py index dbbe3f5a8..c57e4681d 100644 --- a/tests/commands/new/test_build_context.py +++ b/tests/commands/new/test_build_context.py @@ -237,7 +237,9 @@ def main(): "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", # Needed for DetailedList - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", + # "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", + # Needed for MapView + # "org.osmdroid:osmdroid-android:6.1.0", ] """, pyproject_table_web="""\ @@ -1010,7 +1012,9 @@ def main(): "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", # Needed for DetailedList - "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", + # "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", + # Needed for MapView + # "org.osmdroid:osmdroid-android:6.1.0", ] """, pyproject_table_web="""\ From 05fedbefd239f1ddd0bf65482658a589f6eda655 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 28 May 2024 11:04:36 +0800 Subject: [PATCH 2/5] Add changenote. --- changes/1845.feature.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/1845.feature.rst diff --git a/changes/1845.feature.rst b/changes/1845.feature.rst new file mode 100644 index 000000000..0bd32a48e --- /dev/null +++ b/changes/1845.feature.rst @@ -0,0 +1 @@ +The default Gradle dependenencies for a Toga project no longer includes SwipeRefreshLayout. From 57fbf0bc92c1e4c9d5268195fbd5439b101be038 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 4 Jun 2024 08:15:13 +0800 Subject: [PATCH 3/5] appCompat is implied by Material. --- src/briefcase/bootstraps/toga.py | 1 - tests/commands/new/test_build_context.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/briefcase/bootstraps/toga.py b/src/briefcase/bootstraps/toga.py index 31bc413a6..34b7cdb38 100644 --- a/src/briefcase/bootstraps/toga.py +++ b/src/briefcase/bootstraps/toga.py @@ -209,7 +209,6 @@ def pyproject_table_android(self): base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ - "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", # Needed for DetailedList # "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py index c57e4681d..4ef46bf6d 100644 --- a/tests/commands/new/test_build_context.py +++ b/tests/commands/new/test_build_context.py @@ -234,7 +234,6 @@ def main(): base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ - "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", # Needed for DetailedList # "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", @@ -1009,7 +1008,6 @@ def main(): base_theme = "Theme.MaterialComponents.Light.DarkActionBar" build_gradle_dependencies = [ - "androidx.appcompat:appcompat:1.6.1", "com.google.android.material:material:1.11.0", # Needed for DetailedList # "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", From 01fafa9103841fa2fb03a76e0b91392c8a974059 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 4 Jun 2024 08:29:54 +0800 Subject: [PATCH 4/5] Add an lower version pin for Toga. --- src/briefcase/bootstraps/toga.py | 12 ++++++------ tests/commands/new/test_build_context.py | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/briefcase/bootstraps/toga.py b/src/briefcase/bootstraps/toga.py index 34b7cdb38..d8f8b52f7 100644 --- a/src/briefcase/bootstraps/toga.py +++ b/src/briefcase/bootstraps/toga.py @@ -51,7 +51,7 @@ def pyproject_table_macOS(self): return """\ universal_build = true requires = [ - "toga-cocoa~=0.4.0", + "toga-cocoa~=0.4.0, >=0.4.5", "std-nslog~=1.0.0", ] """ @@ -59,7 +59,7 @@ def pyproject_table_macOS(self): def pyproject_table_linux(self): return """\ requires = [ - "toga-gtk~=0.4.0", + "toga-gtk~=0.4.0, >=0.4.5", ] """ @@ -188,14 +188,14 @@ def pyproject_table_linux_flatpak(self): def pyproject_table_windows(self): return """\ requires = [ - "toga-winforms~=0.4.0", + "toga-winforms~=0.4.0, >=0.4.5", ] """ def pyproject_table_iOS(self): return """\ requires = [ - "toga-iOS~=0.4.0", + "toga-iOS~=0.4.0, >=0.4.5", "std-nslog~=1.0.0", ] """ @@ -203,7 +203,7 @@ def pyproject_table_iOS(self): def pyproject_table_android(self): return """\ requires = [ - "toga-android~=0.4.0", + "toga-android~=0.4.0, >=0.4.5", ] base_theme = "Theme.MaterialComponents.Light.DarkActionBar" @@ -220,7 +220,7 @@ def pyproject_table_android(self): def pyproject_table_web(self): return """\ requires = [ - "toga-web~=0.4.0", + "toga-web~=0.4.0, >=0.4.5", ] style_framework = "Shoelace v2.3" """ diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py index 4ef46bf6d..a22c53fb4 100644 --- a/tests/commands/new/test_build_context.py +++ b/tests/commands/new/test_build_context.py @@ -96,13 +96,13 @@ def main(): pyproject_table_macOS="""\ universal_build = true requires = [ - "toga-cocoa~=0.4.0", + "toga-cocoa~=0.4.0, >=0.4.5", "std-nslog~=1.0.0", ] """, pyproject_table_linux="""\ requires = [ - "toga-gtk~=0.4.0", + "toga-gtk~=0.4.0, >=0.4.5", ] """, pyproject_table_linux_system_debian="""\ @@ -217,18 +217,18 @@ def main(): """, pyproject_table_windows="""\ requires = [ - "toga-winforms~=0.4.0", + "toga-winforms~=0.4.0, >=0.4.5", ] """, pyproject_table_iOS="""\ requires = [ - "toga-iOS~=0.4.0", + "toga-iOS~=0.4.0, >=0.4.5", "std-nslog~=1.0.0", ] """, pyproject_table_android="""\ requires = [ - "toga-android~=0.4.0", + "toga-android~=0.4.0, >=0.4.5", ] base_theme = "Theme.MaterialComponents.Light.DarkActionBar" @@ -243,7 +243,7 @@ def main(): """, pyproject_table_web="""\ requires = [ - "toga-web~=0.4.0", + "toga-web~=0.4.0, >=0.4.5", ] style_framework = "Shoelace v2.3" """, @@ -870,13 +870,13 @@ def main(): pyproject_table_macOS="""\ universal_build = true requires = [ - "toga-cocoa~=0.4.0", + "toga-cocoa~=0.4.0, >=0.4.5", "std-nslog~=1.0.0", ] """, pyproject_table_linux="""\ requires = [ - "toga-gtk~=0.4.0", + "toga-gtk~=0.4.0, >=0.4.5", ] """, pyproject_table_linux_system_debian="""\ @@ -991,18 +991,18 @@ def main(): """, pyproject_table_windows="""\ requires = [ - "toga-winforms~=0.4.0", + "toga-winforms~=0.4.0, >=0.4.5", ] """, pyproject_table_iOS="""\ requires = [ - "toga-iOS~=0.4.0", + "toga-iOS~=0.4.0, >=0.4.5", "std-nslog~=1.0.0", ] """, pyproject_table_android="""\ requires = [ - "toga-android~=0.4.0", + "toga-android~=0.4.0, >=0.4.5", ] base_theme = "Theme.MaterialComponents.Light.DarkActionBar" @@ -1017,7 +1017,7 @@ def main(): """, pyproject_table_web="""\ requires = [ - "toga-web~=0.4.0", + "toga-web~=0.4.0, >=0.4.5", ] style_framework = "Shoelace v2.3" """, From a3c284a17136bc9d9024c6a413c4c9da3dba57a0 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 5 Jun 2024 11:46:07 +0800 Subject: [PATCH 5/5] Simplify Toga version specifiers. --- src/briefcase/bootstraps/toga.py | 12 ++++++------ tests/commands/new/test_build_context.py | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/briefcase/bootstraps/toga.py b/src/briefcase/bootstraps/toga.py index d8f8b52f7..1d298fec2 100644 --- a/src/briefcase/bootstraps/toga.py +++ b/src/briefcase/bootstraps/toga.py @@ -51,7 +51,7 @@ def pyproject_table_macOS(self): return """\ universal_build = true requires = [ - "toga-cocoa~=0.4.0, >=0.4.5", + "toga-cocoa~=0.4.5", "std-nslog~=1.0.0", ] """ @@ -59,7 +59,7 @@ def pyproject_table_macOS(self): def pyproject_table_linux(self): return """\ requires = [ - "toga-gtk~=0.4.0, >=0.4.5", + "toga-gtk~=0.4.5", ] """ @@ -188,14 +188,14 @@ def pyproject_table_linux_flatpak(self): def pyproject_table_windows(self): return """\ requires = [ - "toga-winforms~=0.4.0, >=0.4.5", + "toga-winforms~=0.4.5", ] """ def pyproject_table_iOS(self): return """\ requires = [ - "toga-iOS~=0.4.0, >=0.4.5", + "toga-iOS~=0.4.5", "std-nslog~=1.0.0", ] """ @@ -203,7 +203,7 @@ def pyproject_table_iOS(self): def pyproject_table_android(self): return """\ requires = [ - "toga-android~=0.4.0, >=0.4.5", + "toga-android~=0.4.5", ] base_theme = "Theme.MaterialComponents.Light.DarkActionBar" @@ -220,7 +220,7 @@ def pyproject_table_android(self): def pyproject_table_web(self): return """\ requires = [ - "toga-web~=0.4.0, >=0.4.5", + "toga-web~=0.4.5", ] style_framework = "Shoelace v2.3" """ diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py index a22c53fb4..759d3381f 100644 --- a/tests/commands/new/test_build_context.py +++ b/tests/commands/new/test_build_context.py @@ -96,13 +96,13 @@ def main(): pyproject_table_macOS="""\ universal_build = true requires = [ - "toga-cocoa~=0.4.0, >=0.4.5", + "toga-cocoa~=0.4.5", "std-nslog~=1.0.0", ] """, pyproject_table_linux="""\ requires = [ - "toga-gtk~=0.4.0, >=0.4.5", + "toga-gtk~=0.4.5", ] """, pyproject_table_linux_system_debian="""\ @@ -217,18 +217,18 @@ def main(): """, pyproject_table_windows="""\ requires = [ - "toga-winforms~=0.4.0, >=0.4.5", + "toga-winforms~=0.4.5", ] """, pyproject_table_iOS="""\ requires = [ - "toga-iOS~=0.4.0, >=0.4.5", + "toga-iOS~=0.4.5", "std-nslog~=1.0.0", ] """, pyproject_table_android="""\ requires = [ - "toga-android~=0.4.0, >=0.4.5", + "toga-android~=0.4.5", ] base_theme = "Theme.MaterialComponents.Light.DarkActionBar" @@ -243,7 +243,7 @@ def main(): """, pyproject_table_web="""\ requires = [ - "toga-web~=0.4.0, >=0.4.5", + "toga-web~=0.4.5", ] style_framework = "Shoelace v2.3" """, @@ -870,13 +870,13 @@ def main(): pyproject_table_macOS="""\ universal_build = true requires = [ - "toga-cocoa~=0.4.0, >=0.4.5", + "toga-cocoa~=0.4.5", "std-nslog~=1.0.0", ] """, pyproject_table_linux="""\ requires = [ - "toga-gtk~=0.4.0, >=0.4.5", + "toga-gtk~=0.4.5", ] """, pyproject_table_linux_system_debian="""\ @@ -991,18 +991,18 @@ def main(): """, pyproject_table_windows="""\ requires = [ - "toga-winforms~=0.4.0, >=0.4.5", + "toga-winforms~=0.4.5", ] """, pyproject_table_iOS="""\ requires = [ - "toga-iOS~=0.4.0, >=0.4.5", + "toga-iOS~=0.4.5", "std-nslog~=1.0.0", ] """, pyproject_table_android="""\ requires = [ - "toga-android~=0.4.0, >=0.4.5", + "toga-android~=0.4.5", ] base_theme = "Theme.MaterialComponents.Light.DarkActionBar" @@ -1017,7 +1017,7 @@ def main(): """, pyproject_table_web="""\ requires = [ - "toga-web~=0.4.0, >=0.4.5", + "toga-web~=0.4.5", ] style_framework = "Shoelace v2.3" """,