Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
mobile ruleP1universalStack: mobile
mobileconfiggradleenvironments
Put environment-specific values in build config, not hardcoded
Base URLs and per-environment values belong in Gradle BuildConfigField / an .xcconfig keyed to build type, not hardcoded in source.
PR: mobile-mining-2026-06Created: Jul 5, 2026
Bad example
Old codekotlin
| 1 | val baseUrl = "https://dev.api.example.com" |
Explanation (EN)
Objašnjenje (HR)
Good example
New codekotlin
| 1 | val baseUrl = BuildConfig.BASE_URL // set per build type in build.gradle |
Explanation (EN)
Objašnjenje (HR)