plugins {
    id("com.android.application") version "8.4.0"
    id("org.jetbrains.kotlin.android") version "1.9.22"
}

android {
    namespace = "com.fnregistry.unibus"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.fnregistry.unibus"
        minSdk = 24
        targetSdk = 34
        versionCode = 1
        versionName = "0.1.0"
    }

    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.8"
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
}

dependencies {
    // unibus client compiled from Go via gomobile: holds the NATS data-plane
    // connection, the HTTP control-plane calls and the end-to-end crypto. This is
    // the same pkg/client every other peer uses, so the protocol has one source
    // of truth.
    implementation(files("libs/unibus.aar"))

    implementation("androidx.activity:activity-compose:1.8.2")
    implementation(platform("androidx.compose:compose-bom:2024.02.00"))
    implementation("androidx.compose.ui:ui")
    implementation("androidx.compose.material3:material3")
    implementation("androidx.compose.ui:ui-tooling-preview")
    debugImplementation("androidx.compose.ui:ui-tooling")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")

    // FnTheme + FnTokens via composite build
    implementation("fn.compose:ui")
}
