0
0
mirror of https://github.com/florisboard/florisboard.git synced 2024-09-20 03:52:18 +02:00
florisboard/app/build.gradle.kts

186 lines
6.7 KiB
Plaintext
Raw Normal View History

2021-02-10 21:38:32 +01:00
plugins {
id("com.android.application")
kotlin("android")
2021-12-19 12:31:30 +01:00
kotlin("plugin.serialization")
id("com.google.devtools.ksp")
id("com.google.android.gms.oss-licenses-plugin")
id("de.mannodermaus.android-junit5")
2021-02-10 21:38:32 +01:00
}
android {
namespace = "dev.patrickgold.florisboard"
compileSdk = 31
2021-11-21 19:07:56 +01:00
buildToolsVersion = "31.0.0"
2021-07-01 18:47:30 +02:00
ndkVersion = "22.1.7171670"
2021-02-10 21:38:32 +01:00
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs = listOf(
"-Xallow-result-return-type",
"-Xopt-in=kotlin.RequiresOptIn",
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
"-Xjvm-default=compatibility",
)
2021-02-10 21:38:32 +01:00
}
defaultConfig {
applicationId = "dev.patrickgold.florisboard"
2022-04-20 00:05:43 +02:00
minSdk = 24
2022-01-06 00:59:06 +01:00
targetSdk = 31
2022-05-17 23:14:42 +02:00
versionCode = 83
2022-05-03 19:57:46 +02:00
versionName = "0.3.16"
2021-02-10 21:38:32 +01:00
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
arg("room.expandProjection", "true")
}
externalNativeBuild {
cmake {
cFlags("-fvisibility=hidden", "-DU_STATIC_IMPLEMENTATION=1")
cppFlags("-fvisibility=hidden", "-std=c++17", "-fexceptions", "-ffunction-sections", "-fdata-sections", "-DU_DISABLE_RENAMING=1", "-DU_STATIC_IMPLEMENTATION=1")
arguments("-DANDROID_STL=c++_static")
}
}
2021-07-01 18:47:30 +02:00
ndk {
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
2021-07-01 18:47:30 +02:00
}
sourceSets {
maybeCreate("main").apply {
assets {
srcDirs("src/main/assets", "src/main/icu4c/prebuilt/assets")
}
jniLibs {
srcDirs("src/main/icu4c/prebuilt/jniLibs")
2021-07-01 18:47:30 +02:00
}
2022-04-11 22:50:01 +02:00
java {
srcDirs("src/main/kotlin")
}
2021-07-01 18:47:30 +02:00
}
}
2021-02-10 21:38:32 +01:00
}
bundle {
language {
// We disable language split because FlorisBoard does not use
// runtime Google Play Service APIs and thus cannot dynamically
// request to download the language resources for a specific locale.
enableSplit = false
}
}
2021-02-10 21:38:32 +01:00
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.1.1"
2021-02-10 21:38:32 +01:00
}
externalNativeBuild {
cmake {
path("src/main/cpp/CMakeLists.txt")
}
}
2021-02-10 21:38:32 +01:00
buildTypes {
named("debug").configure {
applicationIdSuffix = ".debug"
2021-03-16 03:17:34 +01:00
versionNameSuffix = "-debug"
isDebuggable = true
2022-02-27 23:04:57 +01:00
isJniDebuggable = false
2021-10-25 23:59:53 +02:00
ndk {
// For running FlorisBoard on the emulator
abiFilters += listOf("x86", "x86_64")
}
2021-03-16 03:17:34 +01:00
resValue("mipmap", "floris_app_icon", "@mipmap/ic_app_icon_debug")
resValue("mipmap", "floris_app_icon_round", "@mipmap/ic_app_icon_debug_round")
2021-10-20 00:47:26 +02:00
resValue("drawable", "floris_app_icon_foreground", "@drawable/ic_app_icon_debug_foreground")
2021-02-10 21:38:32 +01:00
resValue("string", "floris_app_name", "FlorisBoard Debug")
}
2021-03-16 03:17:34 +01:00
create("beta") // Needed because by default the "beta" BuildType does not exist
named("beta").configure {
applicationIdSuffix = ".beta"
2022-05-17 23:14:42 +02:00
versionNameSuffix = "-beta03"
2021-03-16 03:17:34 +01:00
proguardFiles.add(getDefaultProguardFile("proguard-android-optimize.txt"))
resValue("mipmap", "floris_app_icon", "@mipmap/ic_app_icon_beta")
resValue("mipmap", "floris_app_icon_round", "@mipmap/ic_app_icon_beta_round")
2021-10-20 00:47:26 +02:00
resValue("drawable", "floris_app_icon_foreground", "@drawable/ic_app_icon_beta_foreground")
2021-03-16 03:17:34 +01:00
resValue("string", "floris_app_name", "FlorisBoard Beta")
}
2021-02-10 21:38:32 +01:00
named("release").configure {
proguardFiles.add(getDefaultProguardFile("proguard-android-optimize.txt"))
2021-03-16 03:17:34 +01:00
resValue("mipmap", "floris_app_icon", "@mipmap/ic_app_icon_stable")
resValue("mipmap", "floris_app_icon_round", "@mipmap/ic_app_icon_stable_round")
resValue("drawable", "floris_app_icon_foreground", "@drawable/ic_app_icon_stable_foreground")
2021-02-10 21:38:32 +01:00
resValue("string", "floris_app_name", "@string/app_name")
}
}
testOptions {
unitTests {
isIncludeAndroidResources = true
}
unitTests.all {
it.useJUnitPlatform()
}
2021-02-10 21:38:32 +01:00
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
2021-02-10 21:38:32 +01:00
dependencies {
implementation("androidx.activity:activity-compose:1.4.0")
implementation("androidx.activity:activity-ktx:1.4.0")
2021-09-08 18:48:28 +02:00
implementation("androidx.autofill:autofill:1.1.0")
implementation("androidx.collection:collection-ktx:1.2.0")
implementation("androidx.compose.material:material:1.1.1")
implementation("androidx.compose.runtime:runtime-livedata:1.1.1")
implementation("androidx.compose.ui:ui:1.1.1")
implementation("androidx.compose.ui:ui-tooling-preview:1.1.1")
implementation("androidx.core:core-ktx:1.7.0")
implementation("androidx.core:core-splashscreen:1.0.0-beta02")
implementation("androidx.emoji2:emoji2:1.1.0")
implementation("androidx.emoji2:emoji2-views:1.1.0")
implementation("androidx.navigation:navigation-compose:2.4.2")
2022-05-08 21:08:17 +02:00
implementation("com.google.accompanist:accompanist-flowlayout:0.23.1")
implementation("com.google.accompanist:accompanist-insets:0.23.1")
implementation("com.google.accompanist:accompanist-systemuicontroller:0.23.1")
implementation("dev.patrickgold.jetpref:jetpref-datastore-model:0.1.0-beta08")
implementation("dev.patrickgold.jetpref:jetpref-datastore-ui:0.1.0-beta08")
implementation("dev.patrickgold.jetpref:jetpref-material-ui:0.1.0-beta08")
implementation("io.github.reactivecircus.cache4k:cache4k:0.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
implementation("androidx.room:room-runtime:2.4.2")
ksp("androidx.room:room-compiler:2.4.2")
2021-02-10 21:38:32 +01:00
testImplementation("io.kotest:kotest-runner-junit5:5.2.3")
testImplementation("io.kotest:kotest-assertions-core:5.2.3")
testImplementation("io.kotest:kotest-property:5.2.3")
testImplementation("io.kotest.extensions:kotest-extensions-robolectric:0.5.0")
testImplementation("nl.jqno.equalsverifier:equalsverifier:3.10")
2021-06-24 16:49:47 +02:00
2021-02-10 21:38:32 +01:00
androidTestImplementation("androidx.test.ext", "junit", "1.1.2")
androidTestImplementation("androidx.test.espresso", "espresso-core", "3.3.0")
}