|
| 1 | +plugins { |
| 2 | + alias(libs.plugins.android.library) |
| 3 | + alias(libs.plugins.kotlin.android) |
| 4 | + kotlin("plugin.serialization") version "2.1.10" |
| 5 | + id("com.google.devtools.ksp") |
| 6 | +} |
| 7 | + |
| 8 | +android { |
| 9 | + namespace = "io.shubham0204.smollm_server" |
| 10 | + compileSdk = 35 |
| 11 | + |
| 12 | + defaultConfig { |
| 13 | + minSdk = 24 |
| 14 | + |
| 15 | + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
| 16 | + consumerProguardFiles("consumer-rules.pro") |
| 17 | + } |
| 18 | + |
| 19 | + buildTypes { |
| 20 | + release { |
| 21 | + isMinifyEnabled = false |
| 22 | + proguardFiles( |
| 23 | + getDefaultProguardFile("proguard-android-optimize.txt"), |
| 24 | + "proguard-rules.pro", |
| 25 | + ) |
| 26 | + } |
| 27 | + } |
| 28 | + compileOptions { |
| 29 | + sourceCompatibility = JavaVersion.VERSION_21 |
| 30 | + targetCompatibility = JavaVersion.VERSION_21 |
| 31 | + } |
| 32 | + kotlinOptions { |
| 33 | + jvmTarget = "21" |
| 34 | + } |
| 35 | +} |
| 36 | + |
| 37 | +val ktorVersion = "3.0.3" |
| 38 | + |
| 39 | +dependencies { |
| 40 | + implementation(libs.androidx.core.ktx) |
| 41 | + implementation(libs.androidx.appcompat) |
| 42 | + implementation(libs.material) |
| 43 | + |
| 44 | + // Ktor server |
| 45 | + implementation("io.ktor:ktor-server-core:$ktorVersion") |
| 46 | + implementation("io.ktor:ktor-server-netty:$ktorVersion") |
| 47 | + |
| 48 | + // kotlinx serialization (JSON) and |
| 49 | + // content-negotiation |
| 50 | + // docs: https://ktor.io/docs/server-serialization.html |
| 51 | + implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion") |
| 52 | + implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") |
| 53 | + |
| 54 | + implementation(project(":smollm")) |
| 55 | + |
| 56 | + testImplementation(libs.junit) |
| 57 | + androidTestImplementation(libs.androidx.junit) |
| 58 | + androidTestImplementation(libs.androidx.espresso.core) |
| 59 | +} |
0 commit comments