Refactor build scripts for consistency, readability, and maintainability#1672
Open
kartikgurnani wants to merge 7 commits intoheremaps:masterfrom
Open
Refactor build scripts for consistency, readability, and maintainability#1672kartikgurnani wants to merge 7 commits intoheremaps:masterfrom
kartikgurnani wants to merge 7 commits intoheremaps:masterfrom
Conversation
✅ cleaner structure ✅ reusable environment variables ✅ concurrency control (cancel old runs) ✅ caching (ccache + dependencies) ✅ matrix builds (less duplication) ✅ better security + permissions ✅ artifact uploads ✅ improved logging + fail handling ✅ comments explaining every section ✅ consistent naming and structure
Update Files
✅ consistent structure ✅ clearer comments ✅ safer shell practices ✅ readable variable naming ✅ smaller logical steps ✅ clean formatting ✅ meaningful messages ✅ minimal redundancy ✅ KISS / DRY principles ✅ maintainable CI-friendly style
Code Rewrite with comments
Expand Code Lines
Add comment to get confirmation for Build completion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Description
This PR refactors the platform build scripts to better align with the HERE Data SDK for C++ contributor guidelines, focusing on readability, maintainability, and consistent structure across all scripts.
The changes improve script structure, error handling, and documentation without modifying build behavior or output.
🚀 Changes Introduced
🧹 Code Quality Improvements
Added strict shell error handling (set -euo pipefail)
Improved readability with consistent formatting and structure
Introduced meaningful variable names and constants
Standardized build directory handling
Removed redundant commands and simplified logic
Added clear build step logging
🏗 Structural Improvements
Unified script structure across platforms:
Android
iOS
macOS
Windows
ARM cross-compilation
Organized scripts into clear steps:
Environment preparation
Configuration
Build execution
Status reporting
📖 Documentation Enhancements
Added clear script purpose descriptions
Improved inline comments
Clarified platform-specific configuration
Improved developer readability
🎯 Motivation
These changes improve:
maintainability of CI build scripts
consistency across platforms
developer onboarding experience
alignment with project implementation guidelines (KISS, DRY, readability)
The refactor preserves existing behavior while making the scripts easier to understand and maintain.
🧪 Testing
Verified scripts execute successfully with the same build configuration.
No functional changes to build outputs.
None.
✅ Checklist
Follows project coding and style guidelines
No behavioral changes introduced
Improves readability and maintainability
Tested locally