|
| 1 | +/* |
| 2 | + * Copyright 2026 Nikolai Kotchetkov. |
| 3 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | + * you may not use this file except in compliance with the License. |
| 5 | + * You may obtain a copy of the License at |
| 6 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | + * Unless required by applicable law or agreed to in writing, software |
| 8 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 9 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 10 | + * See the License for the specific language governing permissions and |
| 11 | + * limitations under the License. |
| 12 | + */ |
| 13 | + |
| 14 | +@file:Suppress("unused") |
| 15 | + |
| 16 | +import org.jetbrains.kotlin.gradle.dsl.JvmTarget |
| 17 | + |
| 18 | +/* |
| 19 | + * Copyright 2022 Nikolai Kotchetkov. |
| 20 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 21 | + * you may not use this file except in compliance with the License. |
| 22 | + * You may obtain a copy of the License at |
| 23 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 24 | + * Unless required by applicable law or agreed to in writing, software |
| 25 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 26 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 27 | + * See the License for the specific language governing permissions and |
| 28 | + * limitations under the License. |
| 29 | + */ |
| 30 | + |
| 31 | +plugins { |
| 32 | + id("com.android.application") |
| 33 | + id("org.jetbrains.kotlin.plugin.compose") |
| 34 | + alias(libs.plugins.google.ksp) |
| 35 | + alias(libs.plugins.hilt) |
| 36 | +} |
| 37 | + |
| 38 | +val versionCode: String by project.extra |
| 39 | +val versionName: String by project.extra |
| 40 | +val androidMinSdkVersion: Int by project.extra |
| 41 | +val androidCompileSdkVersion: Int by project.extra |
| 42 | +val androidTargetSdkVersion: Int by project.extra |
| 43 | + |
| 44 | +android { |
| 45 | + compileSdk = androidCompileSdkVersion |
| 46 | + |
| 47 | + defaultConfig { |
| 48 | + applicationId = "com.motorro.statemachine.books.book.demo" |
| 49 | + |
| 50 | + minSdk = androidMinSdkVersion |
| 51 | + targetSdk = androidTargetSdkVersion |
| 52 | + versionCode = versionCode |
| 53 | + versionName = versionName |
| 54 | + |
| 55 | + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
| 56 | + vectorDrawables { |
| 57 | + useSupportLibrary = true |
| 58 | + } |
| 59 | + } |
| 60 | + |
| 61 | + buildTypes { |
| 62 | + release { |
| 63 | + isMinifyEnabled = false |
| 64 | + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") |
| 65 | + } |
| 66 | + } |
| 67 | + compileOptions { |
| 68 | + isCoreLibraryDesugaringEnabled = true |
| 69 | + sourceCompatibility = JavaVersion.VERSION_17 |
| 70 | + targetCompatibility = JavaVersion.VERSION_17 |
| 71 | + } |
| 72 | + kotlin { |
| 73 | + compilerOptions { |
| 74 | + jvmTarget.set(JvmTarget.JVM_17) |
| 75 | + } |
| 76 | + } |
| 77 | + buildFeatures { |
| 78 | + compose = true |
| 79 | + } |
| 80 | + packaging { |
| 81 | + resources { |
| 82 | + excludes += "/META-INF/{AL2.0,LGPL2.1}" |
| 83 | + } |
| 84 | + } |
| 85 | + namespace = "com.motorro.statemachine.books.book.demo" |
| 86 | +} |
| 87 | + |
| 88 | +dependencies { |
| 89 | + implementation(project(":commonstatemachine")) |
| 90 | + implementation(project(":commonflow:data")) |
| 91 | + implementation(project(":commonflow:compose")) |
| 92 | + implementation(project(":commonflow:viewmodel")) |
| 93 | + |
| 94 | + implementation(project(":examples:commoncore")) |
| 95 | + implementation(project(":examples:androidcore")) |
| 96 | + implementation(project(":examples:books:domain")) |
| 97 | + implementation(project(":examples:books:book")) |
| 98 | + |
| 99 | + coreLibraryDesugaring(libs.desugaring) |
| 100 | + |
| 101 | + implementation(libs.androidx.core) |
| 102 | + implementation(libs.androidx.lifecycle.runtime) |
| 103 | + implementation(libs.androidx.lifecycle.livedata) |
| 104 | + implementation(libs.androidx.lifecycle.viewmodel) |
| 105 | + |
| 106 | + implementation(libs.kotlin.immutable) |
| 107 | + implementation(libs.kotlin.coroutines.core) |
| 108 | + implementation(libs.kotlin.coroutines.android) |
| 109 | + |
| 110 | + implementation(platform(libs.compose.bom)) |
| 111 | + |
| 112 | + implementation(libs.bundles.compose.core) |
| 113 | + implementation(libs.compose.activity) |
| 114 | + implementation(libs.compose.viewmodel) |
| 115 | + implementation(libs.compose.foundation) |
| 116 | + implementation(libs.compose.foundation.layouts) |
| 117 | + implementation(libs.compose.material.icons) |
| 118 | + |
| 119 | + implementation(libs.hilt.android) |
| 120 | + implementation(libs.hilt.compose) |
| 121 | + ksp(libs.hilt.compiler) |
| 122 | + ksp(libs.hilt.compiler.androidx) |
| 123 | + |
| 124 | + debugImplementation(libs.compose.tooling) |
| 125 | +} |
0 commit comments