2021-02-10 21:38:32 +01:00
|
|
|
plugins {
|
2021-09-24 18:58:40 +02:00
|
|
|
id("com.android.application")
|
|
|
|
kotlin("android")
|
2021-12-19 12:31:30 +01:00
|
|
|
kotlin("plugin.serialization")
|
2022-05-07 11:52:49 +02:00
|
|
|
id("com.google.devtools.ksp")
|
2021-09-24 18:58:40 +02:00
|
|
|
id("com.google.android.gms.oss-licenses-plugin")
|
2021-09-30 00:27:33 +02:00
|
|
|
id("de.mannodermaus.android-junit5")
|
2021-02-10 21:38:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2022-05-11 23:15:59 +02:00
|
|
|
namespace = "dev.patrickgold.florisboard"
|
2021-09-08 19:29:40 +02:00
|
|
|
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()
|
2021-11-10 22:18:04 +01:00
|
|
|
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"
|
2021-05-05 18:32:48 +02:00
|
|
|
|
2022-05-07 11:52:49 +02:00
|
|
|
ksp {
|
|
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
|
|
arg("room.incremental", "true")
|
|
|
|
arg("room.expandProjection", "true")
|
2021-05-05 18:32:48 +02:00
|
|
|
}
|
2021-05-12 00:40:53 +02:00
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2021-07-01 21:26:59 +02:00
|
|
|
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")
|
2021-05-12 00:40:53 +02:00
|
|
|
arguments("-DANDROID_STL=c++_static")
|
|
|
|
}
|
|
|
|
}
|
2021-07-01 18:47:30 +02:00
|
|
|
|
|
|
|
ndk {
|
2021-07-01 21:26:59 +02:00
|
|
|
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
2021-07-01 18:47:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
maybeCreate("main").apply {
|
2021-08-16 20:20:53 +02:00
|
|
|
assets {
|
|
|
|
srcDirs("src/main/assets", "src/main/icu4c/prebuilt/assets")
|
|
|
|
}
|
2021-07-30 21:01:32 +02:00
|
|
|
jniLibs {
|
2021-08-16 20:20:53 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2022-03-08 19:09:23 +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 {
|
2021-09-08 19:29:40 +02:00
|
|
|
compose = true
|
|
|
|
}
|
|
|
|
|
|
|
|
composeOptions {
|
2022-02-28 23:58:21 +01:00
|
|
|
kotlinCompilerExtensionVersion = "1.1.1"
|
2021-02-10 21:38:32 +01:00
|
|
|
}
|
|
|
|
|
2021-05-12 00:40:53 +02: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"
|
|
|
|
|
2021-05-14 21:03:49 +02:00
|
|
|
isDebuggable = true
|
2022-02-27 23:04:57 +01:00
|
|
|
isJniDebuggable = false
|
2021-05-14 21:03:49 +02:00
|
|
|
|
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
|
|
|
|
2022-04-10 21:09:04 +02: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
|
|
|
|
}
|
2021-09-30 00:27:33 +02:00
|
|
|
unitTests.all {
|
|
|
|
it.useJUnitPlatform()
|
|
|
|
}
|
2021-02-10 21:38:32 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-30 00:27:33 +02:00
|
|
|
tasks.withType<Test> {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2021-02-10 21:38:32 +01:00
|
|
|
dependencies {
|
2021-10-31 17:03:44 +01:00
|
|
|
implementation("androidx.activity:activity-compose:1.4.0")
|
2021-12-19 19:36:26 +01:00
|
|
|
implementation("androidx.activity:activity-ktx:1.4.0")
|
2021-09-08 18:48:28 +02:00
|
|
|
implementation("androidx.autofill:autofill:1.1.0")
|
2021-12-13 00:32:15 +01:00
|
|
|
implementation("androidx.collection:collection-ktx:1.2.0")
|
2022-02-28 23:58:21 +01:00
|
|
|
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")
|
2021-10-29 20:24:32 +02:00
|
|
|
implementation("androidx.core:core-ktx:1.7.0")
|
2022-04-10 14:53:48 +02:00
|
|
|
implementation("androidx.core:core-splashscreen:1.0.0-beta02")
|
2022-02-27 18:52:11 +01:00
|
|
|
implementation("androidx.emoji2:emoji2:1.1.0")
|
|
|
|
implementation("androidx.emoji2:emoji2-views:1.1.0")
|
2022-04-10 14:53:48 +02:00
|
|
|
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")
|
2022-02-14 00:20:46 +01:00
|
|
|
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")
|
2022-04-20 02:03:34 +02:00
|
|
|
implementation("io.github.reactivecircus.cache4k:cache4k:0.5.0")
|
2022-04-10 14:53:48 +02:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1")
|
2022-02-03 20:40:34 +01:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
|
2022-02-28 23:58:21 +01:00
|
|
|
implementation("androidx.room:room-runtime:2.4.2")
|
2022-05-07 11:52:49 +02:00
|
|
|
ksp("androidx.room:room-compiler:2.4.2")
|
2021-02-10 21:38:32 +01:00
|
|
|
|
2022-04-10 14:53:48 +02: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")
|
2022-01-27 23:49:20 +01:00
|
|
|
testImplementation("io.kotest.extensions:kotest-extensions-robolectric:0.5.0")
|
2022-04-10 14:53:48 +02:00
|
|
|
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")
|
|
|
|
}
|