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
| import android.util.Log | |
| import androidx.test.runner.screenshot.Screenshot | |
| import org.junit.rules.TestWatcher | |
| import org.junit.runner.Description | |
| import java.io.* | |
| import java.util.* | |
| import java.util.concurrent.atomic.AtomicInteger | |
| import java.util.zip.ZipEntry | |
| import java.util.zip.ZipOutputStream |
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
| android { | |
| ... | |
| flavorDimensions "version" | |
| productFlavors { | |
| free { | |
| dimension "version" | |
| } | |
| paid { | |
| dimension "version" | |
| } |
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
| android { | |
| ... | |
| productFlavors { | |
| free { | |
| applicationIdSuffix ".free" | |
| resValue "string", "app_name", "My Free App" | |
| } | |
| paid { | |
| resValue "string", "app_name", "My Paid App" | |
| } |
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
| android { | |
| ... | |
| flavorDimensions "environment" | |
| productFlavors { | |
| dev { | |
| dimension "environment" | |
| } | |
| integration { | |
| dimension "environment" | |
| } |
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
| android { | |
| ... | |
| productFlavors { | |
| dev { | |
| buildConfigField "String", "BASE_URL", "\"https://api.dev.example.com\"" | |
| buildConfigField "boolean", "DEBUG", "true" | |
| } | |
| integration { | |
| buildConfigField "String", "BASE_URL", "\"https://api.integration.example.com\"" | |
| buildConfigField "boolean", "DEBUG", "true" |
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
| if (BuildConfig.FLAVOR.equals("dev")) { | |
| // Code for the development environment | |
| } else if (BuildConfig.FLAVOR.equals("integration")) { | |
| // Code for the integration environment | |
| } else if (BuildConfig.FLAVOR.equals("production")) { | |
| // Code for the production environment | |
| } |
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
| android { | |
| ... | |
| flavorDimensions "testing" | |
| productFlavors { | |
| mock { | |
| dimension "testing" | |
| } | |
| // Other flavors (dev, production, etc.) | |
| } | |
| } |
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
| android { | |
| ... | |
| productFlavors { | |
| mock { | |
| buildConfigField "String", "BASE_URL", "\"http://mockserver.example.com\"" | |
| // Other testing-specific configurations | |
| } | |
| // Other flavors' configurations | |
| } | |
| } |
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
| class UiTests { | |
| @get:Rule | |
| val serverRule = MockWebServerRule(BuildConfig.BASE_URL) | |
| @Test | |
| fun testUiWithMockServer() { | |
| // Set up mock server responses |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <font-family xmlns:app="http://schemas.android.com/apk/res-auto"> | |
| <font | |
| app:font="@font/MyFont-Regular" | |
| app:fontStyle="normal" | |
| app:fontWeight="400" /> | |
| </font-family> |
OlderNewer