Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
394 commits
Select commit Hold shift + click to select a range
cf6167a
Standardize tile cycle manager formatting
Dhangofa Sep 10, 2026
54ba500
Enhance dual-SIM handling and error reporting in tile service
Dhangofa Sep 10, 2026
2077167
Prevent duplicate permission granted callbacks
Dhangofa Sep 10, 2026
8ea56e4
Remove unused imports from DialogHelper
Dhangofa Sep 10, 2026
a9155a9
Add thread cancellation and process cleanup in execution controller
Dhangofa Sep 10, 2026
4c8b200
Modularize execution mode UI card controller
Dhangofa Sep 10, 2026
af13d34
Standardize TargetSimUiController formatting
Dhangofa Sep 10, 2026
00af9af
Standardize TileIconManager formatting
Dhangofa Sep 10, 2026
ebea76e
Support dual SIM execution in tile cycle sync controller
Dhangofa Sep 11, 2026
47f7f79
Standardize TileCycleUiController formatting
Dhangofa Sep 11, 2026
cd68128
Modularize diagnostic reporting UI controller
Dhangofa Sep 11, 2026
7000987
Implement interactive Broadcasts tab controller
Dhangofa Sep 11, 2026
185def6
Implement auto-saving Routine Shortcuts tab controller
Dhangofa Sep 11, 2026
d9dfab2
Implement Guides tab controller
Dhangofa Sep 11, 2026
391928a
Modularize app footer helper
Dhangofa Sep 11, 2026
73ee383
Implement multi-mode ThemeController
Dhangofa Sep 11, 2026
787116c
Implement navigation layout and orientation helper
Dhangofa Sep 11, 2026
c466d1b
Implement gesture-driven tab navigation controller
Dhangofa Sep 11, 2026
dc282e6
Remove obsolete onboarding carousel manager
Dhangofa Sep 11, 2026
88c6c69
Remove obsolete shortcut dialog helper
Dhangofa Sep 11, 2026
1d0b442
Add Warm Charcoal & Sand palette, broadcast strokes, and shortcut colors
Dhangofa Sep 11, 2026
1867900
Add dark mode tokens for Warm Charcoal & Sand, Broadcasts, and Shortcuts
Dhangofa Sep 11, 2026
d772bd0
Add color state list for Broadcasts segmented control
Dhangofa Sep 11, 2026
a151002
Add Theme.NetToggle.Splash and surface background styling
Dhangofa Sep 11, 2026
4d4cbf9
Add dark mode Theme.NetToggle.Splash
Dhangofa Sep 11, 2026
a6d1734
Add Android 12+ SplashScreen theme
Dhangofa Sep 11, 2026
3789b65
Add Android 12+ dark mode SplashScreen theme
Dhangofa Sep 11, 2026
c9ffcc2
Add 3D card popup state list animator
Dhangofa Sep 11, 2026
fa31f09
Add unpadded NetToggle brand logo vector
Dhangofa Sep 11, 2026
f01f7e7
Add splash screen background drawable
Dhangofa Sep 11, 2026
d3679b9
Add splash screen icon vector
Dhangofa Sep 11, 2026
39b078c
Add Home navigation outline icon
Dhangofa Sep 11, 2026
a2c42b5
Add Home navigation filled icon
Dhangofa Sep 11, 2026
4057af8
Add Automate navigation outline icon
Dhangofa Sep 11, 2026
53235e7
Add Automate navigation filled icon
Dhangofa Sep 11, 2026
a73c633
Add Guides navigation outline icon
Dhangofa Sep 11, 2026
c620bae
Add Guides navigation filled icon
Dhangofa Sep 11, 2026
2e695d1
Correct SIM card vector path geometry
Dhangofa Sep 11, 2026
a59a583
Correct SIM card vector path geometry
Dhangofa Sep 11, 2026
85f8729
Add plus vector icon
Dhangofa Sep 11, 2026
1e2fa16
Add broadcast vector icon
Dhangofa Sep 11, 2026
c9220ee
Add clipboard copy vector icon
Dhangofa Sep 11, 2026
006ffdd
Add trash delete vector icon
Dhangofa Sep 11, 2026
4b6120b
Add glowing lightbulb vector icon
Dhangofa Sep 11, 2026
1ad118e
Add pushpin vector icon
Dhangofa Sep 11, 2026
a8cddaa
Add play arrow vector icon
Dhangofa Sep 11, 2026
321f0c1
Add quick settings tile vector icon
Dhangofa Sep 11, 2026
b6ef857
Remove obsolete network bars vector icon
Dhangofa Sep 11, 2026
d2dbe35
Remove obsolete shortcut network vector icon
Dhangofa Sep 11, 2026
2798e95
Add floating navigation bar pill background
Dhangofa Sep 11, 2026
e88c6be
Add selected navigation item indicator background
Dhangofa Sep 11, 2026
f297f05
Add landscape edge navigation rail background
Dhangofa Sep 11, 2026
67da94e
Add modern circular switch thumb selector
Dhangofa Sep 11, 2026
3d52fad
Add broadcast theme switch track selector
Dhangofa Sep 11, 2026
95ddd7b
Add wavy squircle floating action button background
Dhangofa Sep 11, 2026
4027800
Add AMOLED wavy floating action button background
Dhangofa Sep 11, 2026
1e1f36e
Add purple slot badge background
Dhangofa Sep 11, 2026
6eb5128
Add green slot badge background
Dhangofa Sep 11, 2026
fd6a6af
Add shortcut limit reached banner background
Dhangofa Sep 11, 2026
6ff20b9
Add chip button ripple background
Dhangofa Sep 11, 2026
39f1881
Add pin to home button background
Dhangofa Sep 11, 2026
944478e
Add test button ripple background
Dhangofa Sep 11, 2026
f54edd6
Add selected SIM chip background
Dhangofa Sep 11, 2026
2d24a41
Add selected mode chip background
Dhangofa Sep 11, 2026
9d191dd
Add unselected parameter chip background
Dhangofa Sep 11, 2026
dfc38a2
Add shortcut counter badge background
Dhangofa Sep 11, 2026
59e86e6
Add non-ripple guide card background shape
Dhangofa Sep 11, 2026
643290f
Add guide pill action button background
Dhangofa Sep 11, 2026
582fe00
Add developer profile pill background
Dhangofa Sep 11, 2026
78e51eb
Add squircle logo container shape
Dhangofa Sep 11, 2026
c06c03c
Add version badge pill drawable
Dhangofa Sep 11, 2026
0b5a76b
Add text input container background
Dhangofa Sep 11, 2026
e81cc91
Add shortcut tips container background
Dhangofa Sep 11, 2026
c4dcf97
Add status badge disabled background
Dhangofa Sep 11, 2026
b1e4fe1
Add status badge ready background
Dhangofa Sep 11, 2026
ffa04ff
Add terminal command box background
Dhangofa Sep 11, 2026
e176904
Remove obsolete ripple pill mask
Dhangofa Sep 11, 2026
3c16e61
Remove obsolete carousel background shape
Dhangofa Sep 11, 2026
54772df
Remove obsolete active dot indicator
Dhangofa Sep 11, 2026
6f0f55a
Remove obsolete inactive dot indicator
Dhangofa Sep 11, 2026
765a212
Remove obsolete FAB background drawable
Dhangofa Sep 11, 2026
d86680d
Remove obsolete floating footer pill
Dhangofa Sep 11, 2026
4adeb07
Improve accessibility on permission bottom sheet
Dhangofa Sep 11, 2026
9231b78
Improve accessibility on error banner layout
Dhangofa Sep 11, 2026
f4221da
Improve accessibility on execution card layout
Dhangofa Sep 11, 2026
b60eb34
Improve accessibility and alignment on tile cycle card layout
Dhangofa Sep 11, 2026
418cce2
Improve accessibility on target SIM card layout
Dhangofa Sep 11, 2026
b1e6ea8
Modernize routine shortcut card layout
Dhangofa Sep 11, 2026
f89935d
Create reusable guide tile component layout
Dhangofa Sep 11, 2026
65fd930
Remove obsolete routine shortcuts dialog layout
Dhangofa Sep 11, 2026
5113d1a
Create modular Home tab layout
Dhangofa Sep 11, 2026
7a4da9e
Create Automate tab layout with Broadcasts and Shortcuts sub-tabs
Dhangofa Sep 11, 2026
c0e30f5
Create Guides tab layout
Dhangofa Sep 11, 2026
5048daf
Create landscape Home tab layout
Dhangofa Sep 11, 2026
667d8b7
Create landscape Automate tab layout
Dhangofa Sep 11, 2026
ddf687e
Create landscape Guides tab layout
Dhangofa Sep 11, 2026
1ee5753
Refactor MainActivity layout to multi-tab navigation architecture
Dhangofa Sep 11, 2026
3f5e943
Implement landscape edge navigation rail in MainActivity layout
Dhangofa Sep 11, 2026
1783100
Refactor MainActivity to orchestrate multi-tab architecture and trans…
Dhangofa Sep 11, 2026
0a8e5ce
Update strings for multi-tab navigation, automation, shortcuts, and g…
Dhangofa Sep 11, 2026
cc897cf
Modify ImageView sizes and drawable resources
Dhangofa Sep 11, 2026
87aed7b
Update ImageView dimensions and source in layout
Dhangofa Sep 11, 2026
5c76803
Resize ImageView dimensions in activity_main.xml
Dhangofa Sep 11, 2026
d84393c
Reduce ImageView size in activity_main.xml
Dhangofa Sep 11, 2026
fbeb5f6
Remove obsolete Action Bar Icon
Dhangofa Sep 11, 2026
b4b45af
Add rounded card surface container drawable
Dhangofa Sep 12, 2026
9674ac8
Add setup hero icon background container
Dhangofa Sep 12, 2026
40073ea
Add selected state container for privileged execution mode cards
Dhangofa Sep 12, 2026
8049493
Add unselected state container for privileged execution mode cards
Dhangofa Sep 12, 2026
5679ee4
Add hero setup primary action button drawable
Dhangofa Sep 12, 2026
94fd061
Add mode option icon container drawable
Dhangofa Sep 12, 2026
8ca6891
Add selected radio button indicator drawable
Dhangofa Sep 12, 2026
1858f21
Add unselected radio button indicator drawable
Dhangofa Sep 12, 2026
27536b4
Add pending authorization badge drawable
Dhangofa Sep 12, 2026
8a433f0
Add recommended badge drawable
Dhangofa Sep 12, 2026
ec7cedc
Add superuser badge drawable
Dhangofa Sep 12, 2026
0c45cbf
Add locked state badge container drawable
Dhangofa Sep 12, 2026
b0947bd
Add key shield vector icon
Dhangofa Sep 12, 2026
9e7cd55
Add lightning bolt vector icon
Dhangofa Sep 12, 2026
e696f9b
Add terminal hash vector icon
Dhangofa Sep 12, 2026
ff13b23
Add right chevron navigation vector icon
Dhangofa Sep 12, 2026
b330c29
Add lock vector icon
Dhangofa Sep 12, 2026
91ad50d
Rename ic_nav_setup_outline.xml to ic_nav_home_outline.xml
Dhangofa Sep 12, 2026
daf2495
Rename ic_nav_setup_filled.xml to ic_nav_home_filled.xml
Dhangofa Sep 12, 2026
2fbb262
Style edge navigation rail background as rounded pill with border
Dhangofa Sep 12, 2026
49d2268
Add bottom sheet slide enter animation
Dhangofa Sep 12, 2026
7cf341e
Add bottom sheet slide exit animation
Dhangofa Sep 12, 2026
b074a6b
Remove legacy fab dialog enter animation
Dhangofa Sep 12, 2026
e8e3f06
Remove legacy fab dialog exit animation
Dhangofa Sep 12, 2026
4754822
Create Two-Card Permission Selector Setup Hero layout
Dhangofa Sep 12, 2026
9ce337b
Integrate Setup Hero, scrollable action bar, and progressive disclosu…
Dhangofa Sep 12, 2026
6da602d
Modernize landscape Home tab with dual-column layout and scrollable a…
Dhangofa Sep 12, 2026
d737d49
Update portrait navigation icon and remove fixed action bar overlay
Dhangofa Sep 12, 2026
9178ac7
Update landscape navigation rail to floating pill shape matching port…
Dhangofa Sep 12, 2026
40aa033
Adjust execution card elevation and clipping for container nesting
Dhangofa Sep 12, 2026
2a7b87e
Add lock status badge container to Target SIM card
Dhangofa Sep 12, 2026
cde7e2b
Add lock status badge container to Quick Tile Cycle card
Dhangofa Sep 12, 2026
288031e
Add explicit padding to routine shortcut item cards
Dhangofa Sep 12, 2026
ac1bf73
Add explicit padding to Routine Shortcuts Overview header card
Dhangofa Sep 12, 2026
c8fcd70
Update bottom sheet dialog window animation and match status bar colo…
Dhangofa Sep 12, 2026
c2cd42f
Match dark mode status bar color to app background
Dhangofa Sep 12, 2026
c828f6b
Add live status indicator tokens, setup hero colors, and clean unused…
Dhangofa Sep 12, 2026
e0e28d6
Add dark mode live status indicator and setup hero color tokens
Dhangofa Sep 12, 2026
7016b58
Add setup hero strings, lock badge strings, and refine typography
Dhangofa Sep 12, 2026
2e1fd50
Implement Setup Hero controller, authorization transitions, and mode …
Dhangofa Sep 12, 2026
19c3692
Refine status callback messages and localize root access notifications
Dhangofa Sep 12, 2026
46596ae
Add lock badge management, touch feedback, and smooth unlock animations
Dhangofa Sep 12, 2026
18cc761
Add lock badge management, touch feedback, unlock animations, and cap…
Dhangofa Sep 12, 2026
e151d96
Add landscape Home card height synchronization, update home icons, an…
Dhangofa Sep 12, 2026
467e7e1
Remove unused MainNavigationHelper skeleton class
Dhangofa Sep 12, 2026
b22b4e3
Add permission status check and direct request method
Dhangofa Sep 12, 2026
583a58d
Set default initial theme to light mode, synchronize status bar with …
Dhangofa Sep 12, 2026
c60dc2b
Orchestrate Setup Hero transitions, streamline imports, and wire capa…
Dhangofa Sep 12, 2026
e8c340b
Clean up Javadoc formatting in reflection helper
Dhangofa Sep 12, 2026
f3e43f3
Fix Shizuku cold-start binder race condition in QS Tile
Dhangofa Sep 12, 2026
0ceb31b
Add Quick Tile Cycle switch track selector
Dhangofa Sep 12, 2026
81c25e6
Add Auto-Restore Preferred Mode strings
Dhangofa Sep 12, 2026
c3e32a2
Add Auto-Restore toggle below cycle pills in Quick Tile Cycle card
Dhangofa Sep 12, 2026
8113650
Add preferences for auto-restoring preferred network mode
Dhangofa Sep 12, 2026
2c68d35
Bind and synchronize Auto-Restore toggle UI
Dhangofa Sep 12, 2026
931651e
Pass AppPreferences to TileCycleUiController
Dhangofa Sep 12, 2026
4b2b11c
Track user-chosen mode and auto-restore mode on notification shade pull
Dhangofa Sep 12, 2026
9975286
Target Android 17 while compiling against Android 16 SDK
Dhangofa Sep 13, 2026
37b20c6
Update Gradle Wrapper workflow
Dhangofa Sep 13, 2026
c3d5494
Add Android 16/17 SDK installation with fallback in build workflow
Dhangofa Sep 13, 2026
aba02ce
build(gradle): update Gradle wrapper to 8.12.1 with SHA-256 checksum
github-actions[bot] Sep 13, 2026
ea62f4f
Add Android 16/17 SDK installation with fallback in build workflow
Dhangofa Sep 13, 2026
314291e
Cleaned up obsolete and unused string resources
Dhangofa Sep 13, 2026
79cd617
Add Chinese localization for app strings
Dhangofa Sep 13, 2026
a2dd5fa
Add Russian localization for app strings
Dhangofa Sep 13, 2026
f28469f
Add Portuguese localization strings
Dhangofa Sep 13, 2026
d6eeced
Add Spanish localization for strings
Dhangofa Sep 13, 2026
2b69796
Add Bengali localization for app strings
Dhangofa Sep 13, 2026
25f6bd8
Validate both SIMs, ensure null safety, and fix Auto badge fallback
Dhangofa Sep 13, 2026
e19ecf3
Validate both SIMs and guarantee null safety in TileCycleSyncController
Dhangofa Sep 13, 2026
f399a92
Pre-validate SIMs via direct target resolution and ensure null-safe r…
Dhangofa Sep 13, 2026
c34b0e2
Add updatePreferredMode policy option to AutomationRequest
Dhangofa Sep 13, 2026
6009f8a
Enrich AutomationResult with execution metadata and per-SIM status
Dhangofa Sep 13, 2026
5d5f56f
Enforce non-empty security token requirement for automation broadcasts
Dhangofa Sep 13, 2026
645191e
Strengthen automation security token entropy
Dhangofa Sep 13, 2026
38cc824
Add real-time token validation and full UUID generator
Dhangofa Sep 13, 2026
25c8e2d
Enable horizontal scrolling for automation security token input
Dhangofa Sep 13, 2026
841dec0
Add validation string for automation token
Dhangofa Sep 13, 2026
76fed3e
Anchor shortcut actions with weighted layout to prevent localization …
Dhangofa Sep 13, 2026
586c61c
Synchronize landscape automation tab layout with read-only token and …
Dhangofa Sep 13, 2026
9435c2f
Prevent action button overflow in permission bottom sheet
Dhangofa Sep 13, 2026
265799b
Add bounding constraints to diagnostic dialog buttons
Dhangofa Sep 13, 2026
5d8ebc2
Make setup hero title rows and status badges responsive
Dhangofa Sep 13, 2026
884e085
Fix deleted shortcuts reappearance, bounds bug, debounce title editin…
Dhangofa Sep 13, 2026
78191a0
Add circular masked ripple drawable for Theme Toggle button
Dhangofa Sep 13, 2026
99aa1e4
Fix Theme Toggle ripple clipping on right side in landscape
Dhangofa Sep 13, 2026
984a52a
Fix Theme Toggle ripple clipping on right side
Dhangofa Sep 13, 2026
18c1ea9
Guard radio group listener against invalid checked ID
Dhangofa Sep 13, 2026
c8e4038
Localize execution state status strings and retain root-check concurr…
Dhangofa Sep 13, 2026
e0e09e9
Track granted callback state to prevent duplicate callbacks on resume
Dhangofa Sep 13, 2026
106c470
Prevent premature dialog recreation and error clearing
Dhangofa Sep 13, 2026
bf76575
Add detailed SIM 1 and SIM 2 resolution to diagnostic report for Both…
Dhangofa Sep 13, 2026
4eb8df4
Clarify cycle selection order comment
Dhangofa Sep 13, 2026
7494fb4
Ensure thread-safe tile icon caching
Dhangofa Sep 13, 2026
389d08d
Pass AppPreferences to TileCycleUiController and refactor Both-SIM sy…
Dhangofa Sep 13, 2026
35a3fe8
Support explicit TargetSim parameter in readCurrentMode
Dhangofa Sep 13, 2026
f9f5b9f
Add explicit TargetSim parameter support in readCurrentMode
Dhangofa Sep 13, 2026
d0d194c
Pass targetSim directly to SubId resolution
Dhangofa Sep 13, 2026
d2bdf17
Add getOverrideTargetSim getter and targetSim SubId resolution
Dhangofa Sep 13, 2026
dd4dd2a
Add explicit TargetSim capabilities resolution and eliminate mutable …
Dhangofa Sep 13, 2026
578be3b
Isolate preferred mode during Both-SIM sync and lifecycle cleanup
Dhangofa Sep 13, 2026
cae9b87
Add destroy method for debounce lifecycle cleanup
Dhangofa Sep 13, 2026
27ecb72
Clean up unused SimResolver field
Dhangofa Sep 13, 2026
3070c1c
Guard against null and NONE execution modes
Dhangofa Sep 13, 2026
cfd1913
Fix pending mode tag reuse, ShortcutManager retry, and cleanup
Dhangofa Sep 13, 2026
b656376
Simplify destroy method in ShortcutTabHelper
Dhangofa Sep 13, 2026
1bd0b4f
Refactor badge count text formatting and logging
Dhangofa Sep 13, 2026
cf89072
Add new strings for token and broadcast features
Dhangofa Sep 13, 2026
8ac53e9
Add new Russian strings for tokens and statuses
Dhangofa Sep 13, 2026
c428451
Add new strings for token and broadcast features
Dhangofa Sep 13, 2026
d917e1a
Add new Bengali strings for various features
Dhangofa Sep 13, 2026
6e6501b
Add new Spanish strings for validation and status
Dhangofa Sep 13, 2026
439c6d2
Implement dynamic capability filtering and UI capability refresh for…
Dhangofa Sep 13, 2026
07c5fa2
Synchronize routine shortcuts capabilities on resume and
Dhangofa Sep 13, 2026
2e14a4b
Update strings.xml
Dhangofa Sep 13, 2026
99282a1
Add new strings for settings and permissions
Dhangofa Sep 13, 2026
81156b1
Add new strings for settings and permission messages
Dhangofa Sep 13, 2026
d4b13c6
Add new strings for settings and permissions
Dhangofa Sep 13, 2026
7db5f7e
Add new strings for settings and permission messages
Dhangofa Sep 13, 2026
20e945a
Add new strings for settings and permission messages
Dhangofa Sep 13, 2026
78fc6a7
Add permission description TextView to bottom sheet
Dhangofa Sep 13, 2026
c19c34e
Persist phone permission request state
Dhangofa Sep 13, 2026
d32ff63
Support permanent denial state in permission bottom sheet
Dhangofa Sep 13, 2026
56f6062
Ensure persistent bottom sheet display on resume, minimize/reopen, an…
Dhangofa Sep 13, 2026
ce1258f
Inject preferences into permission manager
Dhangofa Sep 13, 2026
f3f075a
Revise full description for NetToggle app
Dhangofa Sep 14, 2026
04864ba
Update short description for 5G network control
Dhangofa Sep 14, 2026
e437bae
Update changelog for version 34 with new features
Dhangofa Sep 14, 2026
6e4b2c4
Update radar rings in ic_launcher.xml
Dhangofa Sep 14, 2026
33157b9
Upgraded the app icon
Dhangofa Sep 14, 2026
f0c5870
Revise full description in metadata for NetToggle
Dhangofa Sep 14, 2026
e653ff3
Delete fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
Dhangofa Sep 14, 2026
c09aec7
Delete fastlane/metadata/android/en-US/images/phoneScreenshots/2.png
Dhangofa Sep 14, 2026
4510aee
Delete fastlane/metadata/android/en-US/images/phoneScreenshots/3.png
Dhangofa Sep 14, 2026
74abb54
Delete fastlane/metadata/android/en-US/images/phoneScreenshots/4.png
Dhangofa Sep 14, 2026
a64afd6
Delete fastlane/metadata/android/en-US/images/phoneScreenshots/5.png
Dhangofa Sep 14, 2026
b1a006f
Delete fastlane/metadata/android/en-US/images/phoneScreenshots/6.png
Dhangofa Sep 14, 2026
3554730
Delete fastlane/metadata/android/en-US/images/phoneScreenshots/7.png
Dhangofa Sep 14, 2026
dcbc0c2
Delete fastlane/metadata/android/en-US/images/phoneScreenshots/8.png
Dhangofa Sep 14, 2026
6490335
Added new app banner
Dhangofa Sep 14, 2026
7a4e6d6
Updated old Screenshots
Dhangofa Sep 14, 2026
87dc693
Updated app icon
Dhangofa Sep 14, 2026
1fb8b0c
Updated Frame 1-7 and added Frame 8
Dhangofa Sep 14, 2026
73c2b68
README Updated with new featues
Dhangofa Sep 14, 2026
d7dece7
Update versionCode and versionName in build.gradle.kts
Dhangofa Sep 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Build and Automate NetToggle Release
name: Build NetToggle

run-name: ${{ github.event_name == 'workflow_dispatch' && (github.ref_name == 'main' && 'Build NetToggle for New Release' || 'Build NetToggle for Testing') || github.event.pull_request.title }}

on:
workflow_dispatch:
Expand All @@ -19,25 +21,35 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v6

- name: Set up Java Development Kit
- name: Set up Java Development Kit (JDK 17)
uses: actions/setup-java@v5
with:
java-version: "17"
distribution: temurin

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-provider: basic

- name: Accept Licenses and Install SDK 36
- name: Accept Licenses and Install Android SDKs (Android 16/17 Support)
run: |
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses || true
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-36"
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-36" || true
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-37" || true

- name: Make Gradle Wrapper Executable
run: chmod +x ./gradlew

- name: Inject Automated Versioning (Test Builds)
if: github.event_name == 'workflow_dispatch' && github.ref_name != 'main'
run: |
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
RUN_NUM=${{ github.run_number }}
sed -i -E "s/versionCode *= *[0-9]+/versionCode = $RUN_NUM/" app/build.gradle.kts
sed -i -E "s/versionName *= *\"([^\"]+)\"/versionName = \"\1-test-$SHORT_SHA\"/" app/build.gradle.kts

echo "Injected Test Versioning:"
grep -E "versionCode|versionName" app/build.gradle.kts

- name: Compile Release APK
run: ./gradlew assembleRelease

Expand Down
36 changes: 23 additions & 13 deletions .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,55 @@ name: Update Gradle Wrapper

on:
workflow_dispatch:
inputs:
gradle_version:
description: 'Gradle version to update to'
required: false
default: '8.12.1'
type: string

permissions:
contents: write

jobs:
update-wrapper:
name: Update Gradle Wrapper
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout Code
uses: actions/checkout@v6

- name: Set up JDK
uses: actions/setup-java@v4
- name: Set up Java Development Kit (JDK 17)
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@v6
with:
gradle-version: '8.7'
gradle-version: ${{ inputs.gradle_version || '8.12.1' }}

- name: Fetch official Gradle checksum
- name: Fetch Official Gradle Checksum
id: checksum
run: |
SHA=$(curl -fsSL https://services.gradle.org/distributions/gradle-8.7-bin.zip.sha256 | tr -d '[:space:]')
VERSION="${{ inputs.gradle_version || '8.12.1' }}"
SHA=$(curl -fsSL "https://services.gradle.org/distributions/gradle-${VERSION}-bin.zip.sha256" | tr -d '[:space:]')
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
echo "Gradle 8.7 bin checksum: $SHA"
echo "Gradle ${VERSION} bin checksum: $SHA"

- name: Regenerate Gradle Wrapper with checksum
- name: Regenerate Gradle Wrapper with Checksum
run: |
VERSION="${{ inputs.gradle_version || '8.12.1' }}"
gradle wrapper \
--gradle-version 8.7 \
--gradle-version "$VERSION" \
--distribution-type bin \
--gradle-distribution-sha256-sum "${{ steps.checksum.outputs.sha }}"

- name: Commit Gradle Wrapper changes
- name: Commit Gradle Wrapper Changes
run: |
VERSION="${{ inputs.gradle_version || '8.12.1' }}"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

Expand All @@ -49,6 +59,6 @@ jobs:
if git diff --cached --quiet; then
echo "No Gradle Wrapper changes to commit."
else
git commit -m "Add Gradle wrapper distribution checksum"
git commit -m "build(gradle): update Gradle wrapper to ${VERSION} with SHA-256 checksum"
git push
fi
Loading