diff --git a/Corona-Warn-App/build.gradle b/Corona-Warn-App/build.gradle
index d0f7db7aae0f183361f05cf152d8754c390a86ac..8adb212052345db4650572d168c0285086658bdb 100644
--- a/Corona-Warn-App/build.gradle
+++ b/Corona-Warn-App/build.gradle
@@ -41,6 +41,28 @@ android {
         buildConfigField "String", "VERIFICATION_CDN_URL", "\"$VERIFICATION_CDN_URL\""
         buildConfigField "String", "EXPORT_SIGNATURE_ID", "\"de.rki.coronawarnapp-dev\""
 
+        //override URLs with local variables
+        Properties properties = new Properties()
+        def propertiesFile = project.rootProject.file('local.properties')
+        if (propertiesFile.exists()) {
+            properties.load(propertiesFile.newDataInputStream())
+            def secretFile = project.rootProject.file('secrets.properties')
+            if (secretFile.exists())
+                properties.load(secretFile.newDataInputStream())
+
+            def DOWNLOAD_CDN_URL = properties.getProperty('DOWNLOAD_CDN_URL')
+            if (DOWNLOAD_CDN_URL)
+                buildConfigField "String", "DOWNLOAD_CDN_URL", "\"$DOWNLOAD_CDN_URL\""
+
+            def SUBMISSION_CDN_URL = properties.getProperty('SUBMISSION_CDN_URL')
+            if (SUBMISSION_CDN_URL)
+                buildConfigField "String", "SUBMISSION_CDN_URL", "\"$SUBMISSION_CDN_URL\""
+
+            def VERIFICATION_CDN_URL = properties.getProperty('VERIFICATION_CDN_URL')
+            if (VERIFICATION_CDN_URL)
+                buildConfigField "String", "VERIFICATION_CDN_URL", "\"$VERIFICATION_CDN_URL\""
+        }
+
         javaCompileOptions {
             annotationProcessorOptions {
                 arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]