All posts
TELEGRAM10 Mar 2025

Base URL, or the domain you need to access to use the API (https://example.com). I'm sure many of you are familiar with it

In build.gradle.kts, add "debug" and set "buildConfig" to true. android { ... buildTypes { debug { buildConfigField("String", "BASE_URL", ""https://test.example.com/"") } release { ... buildConfigField("String", "BASE_URL", ""https://example.com/") } } ... buildFeatures { buildConfig = true ... } } Now build the project, and you can retrieve the string from the base URL anywhere in the module using BuildConfig.BASE_URL

This post is synced with the @developerbox channel

This page was machine-translated from Russian

RU