plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.compose) } // The webapp lives at the repo root, independent of tsbridge (which serves // whatever directory it is pointed at). This copy makes it part of the APK's // assets so the app can unpack and serve it by default. val syncWebappAssets = tasks.register("syncWebappAssets") { from(rootDir.resolve("webapp")) into(layout.buildDirectory.dir("generated/webappAssets/webapp")) } tasks.named("preBuild") { dependsOn(syncWebappAssets) } android { namespace = "com.tsbutt.app" compileSdk = 35 sourceSets["main"].assets.srcDir(layout.buildDirectory.dir("generated/webappAssets")) defaultConfig { applicationId = "com.tsbutt.app" minSdk = 26 targetSdk = 35 versionCode = 1 versionName = "0.1.0" } buildTypes { release { isMinifyEnabled = false } } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" } buildFeatures { compose = true } } dependencies { // gomobile bind output (built by `gomobile bind` in the nix devshell). implementation(files("libs/tsbridge.aar")) implementation(libs.androidx.activity.compose) implementation(libs.androidx.lifecycle.runtime.ktx) implementation(platform(libs.androidx.compose.bom)) implementation(libs.androidx.compose.ui) implementation(libs.androidx.compose.ui.tooling.preview) implementation(libs.androidx.compose.material3) testImplementation(libs.junit) }