Skip to content

Instantly share code, notes, and snippets.

@Pratham-Sortly
Last active August 7, 2025 09:36
Show Gist options
  • Select an option

  • Save Pratham-Sortly/d5759c86b75b2d8722330fa8a52f20b3 to your computer and use it in GitHub Desktop.

Select an option

Save Pratham-Sortly/d5759c86b75b2d8722330fa8a52f20b3 to your computer and use it in GitHub Desktop.
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
android {
namespace = "com.pratham.blogsampleapp"
compileSdk = 36
defaultConfig {
applicationId = "com.pratham.blogsampleapp"
minSdk = 29
targetSdk = 36
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
flavorDimensions += "version"
productFlavors {
create("dev") {
applicationIdSuffix = ".dev"
versionNameSuffix = "-dev"
}
create("qa") {
applicationIdSuffix = ".qa"
versionNameSuffix = "-qa"
}
create("prod") {
applicationIdSuffix = ""
}
}
buildFeatures {
buildConfig = true
}
buildTypes {
create("staging") {
isDebuggable = true
isShrinkResources = false
isMinifyEnabled = false
buildConfigField("boolean", "ENABLE_ANALYICS", "false")
}
getByName("release") {
isDebuggable = false
isShrinkResources = true
isMinifyEnabled = true
buildConfigField("boolean", "ENABLE_ANALYICS", "true")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
buildFeatures {
compose = true
}
androidComponents {
beforeVariants { variantBuilder ->
if (variantBuilder.productFlavors.contains("version" to "dev") &&
variantBuilder.buildType == "release") {
variantBuilder.enable = false
}
if (variantBuilder.productFlavors.contains("version" to "qa") &&
variantBuilder.buildType == "release") {
variantBuilder.enable = false
}
if (variantBuilder.productFlavors.contains("version" to "prod") &&
variantBuilder.buildType == "debug") {
variantBuilder.enable = false
}
if (variantBuilder.productFlavors.contains("version" to "prod") &&
variantBuilder.buildType == "staging") {
variantBuilder.enable = false
}
}
}
lint {
showAll = true
abortOnError = false
}
testOptions {
unitTests.isReturnDefaultValues = true
}
}
dependencies {
implementation(project(":design-system"))
implementation(project(":feature-one"))
implementation(project(":feature-two"))
implementation(project(":feature-three"))
implementation(project(":core-network"))
implementation(project(":core-ui"))
implementation(project(":design-system"))
implementation(project(":local-storage"))
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment