Hey guys, on an Android App module (`product: andr...
# amper
m
Hey guys, on an Android App module (
product: android/app
) is the BuildConfig class being generated? I tried even to set the variants on my yml, the class not exists on the classpath.
a
Hi, thank you for the question: • we don't support build variants in Amper for now • we don't support build config feature for android now in Amper as well • however, you are still able to use build config feature using gradle interop: ◦ just put
build.gradle.kts
next to
module.yaml
with following content:
Copy code
android {

    buildFeatures.buildConfig = true

    buildTypes {
        debug {
            buildConfigField("String", "API_URL", "\"<https://api.debug.example.com/>\"")
        }
        release {
            buildConfigField("String", "API_URL", "\"<https://api.example.com/>\"")
        }
    }
}
run
generateDebugBuildConfig
or just run build to generate all build config you need Class should be appeared in your resolve context and also you could check
build/generated/source
folder
m
thanks for the answer @Anton Prokhorov
kodee welcoming 1