Skip to content

Commit

Permalink
Merge pull request #1845 from freakboy3742/toga-android-gradle-deps
Browse files Browse the repository at this point in the history
Flag optional Toga gradle dependencies.
  • Loading branch information
mhsmith authored Jun 11, 2024
2 parents 301a3c1 + 05f3dad commit ed7e596
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
1 change: 1 addition & 0 deletions changes/1845.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The default Gradle dependenencies for a Toga project no longer includes SwipeRefreshLayout.
17 changes: 9 additions & 8 deletions src/briefcase/bootstraps/toga.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ def pyproject_table_macOS(self):
return """\
universal_build = true
requires = [
"toga-cocoa~=0.4.0",
"toga-cocoa~=0.4.5",
"std-nslog~=1.0.0",
]
"""

def pyproject_table_linux(self):
return """\
requires = [
"toga-gtk~=0.4.0",
"toga-gtk~=0.4.5",
]
"""

Expand Down Expand Up @@ -188,38 +188,39 @@ def pyproject_table_linux_flatpak(self):
def pyproject_table_windows(self):
return """\
requires = [
"toga-winforms~=0.4.0",
"toga-winforms~=0.4.5",
]
"""

def pyproject_table_iOS(self):
return """\
requires = [
"toga-iOS~=0.4.0",
"toga-iOS~=0.4.5",
"std-nslog~=1.0.0",
]
"""

def pyproject_table_android(self):
return """\
requires = [
"toga-android~=0.4.0",
"toga-android~=0.4.5",
]
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",
# "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0",
# Needed for MapView
# "org.osmdroid:osmdroid-android:6.1.0",
]
"""

def pyproject_table_web(self):
return """\
requires = [
"toga-web~=0.4.0",
"toga-web~=0.4.5",
]
style_framework = "Shoelace v2.3"
"""
34 changes: 18 additions & 16 deletions tests/commands/new/test_build_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ def main():
pyproject_table_macOS="""\
universal_build = true
requires = [
"toga-cocoa~=0.4.0",
"toga-cocoa~=0.4.5",
"std-nslog~=1.0.0",
]
""",
pyproject_table_linux="""\
requires = [
"toga-gtk~=0.4.0",
"toga-gtk~=0.4.5",
]
""",
pyproject_table_linux_system_debian="""\
Expand Down Expand Up @@ -219,32 +219,33 @@ def main():
""",
pyproject_table_windows="""\
requires = [
"toga-winforms~=0.4.0",
"toga-winforms~=0.4.5",
]
""",
pyproject_table_iOS="""\
requires = [
"toga-iOS~=0.4.0",
"toga-iOS~=0.4.5",
"std-nslog~=1.0.0",
]
""",
pyproject_table_android="""\
requires = [
"toga-android~=0.4.0",
"toga-android~=0.4.5",
]
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",
# "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0",
# Needed for MapView
# "org.osmdroid:osmdroid-android:6.1.0",
]
""",
pyproject_table_web="""\
requires = [
"toga-web~=0.4.0",
"toga-web~=0.4.5",
]
style_framework = "Shoelace v2.3"
""",
Expand Down Expand Up @@ -994,13 +995,13 @@ def main():
pyproject_table_macOS="""\
universal_build = true
requires = [
"toga-cocoa~=0.4.0",
"toga-cocoa~=0.4.5",
"std-nslog~=1.0.0",
]
""",
pyproject_table_linux="""\
requires = [
"toga-gtk~=0.4.0",
"toga-gtk~=0.4.5",
]
""",
pyproject_table_linux_system_debian="""\
Expand Down Expand Up @@ -1115,32 +1116,33 @@ def main():
""",
pyproject_table_windows="""\
requires = [
"toga-winforms~=0.4.0",
"toga-winforms~=0.4.5",
]
""",
pyproject_table_iOS="""\
requires = [
"toga-iOS~=0.4.0",
"toga-iOS~=0.4.5",
"std-nslog~=1.0.0",
]
""",
pyproject_table_android="""\
requires = [
"toga-android~=0.4.0",
"toga-android~=0.4.5",
]
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",
# "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0",
# Needed for MapView
# "org.osmdroid:osmdroid-android:6.1.0",
]
""",
pyproject_table_web="""\
requires = [
"toga-web~=0.4.0",
"toga-web~=0.4.5",
]
style_framework = "Shoelace v2.3"
""",
Expand Down

0 comments on commit ed7e596

Please sign in to comment.