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

161 lines
6.0 KiB
Plaintext
Raw Normal View History

2021-02-10 21:38:32 +01:00
plugins {
2021-09-07 23:58:41 +02:00
id("com.android.application") version "7.0.2"
kotlin("android") version "1.5.21"
kotlin("kapt") version "1.5.21"
kotlin("plugin.serialization") version "1.5.21"
2021-02-10 21:38:32 +01:00
}
android {
compileSdk = 31
buildToolsVersion = "30.0.3"
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")
2021-02-10 21:38:32 +01:00
}
defaultConfig {
applicationId = "dev.patrickgold.florisboard"
minSdk = 23
targetSdk = 30
2021-08-26 12:58:30 +02:00
versionCode = 56
versionName = "0.3.13"
2021-02-10 21:38:32 +01:00
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments += mapOf(
Pair("room.schemaLocation", "$projectDir/schemas"),
Pair("room.incremental", "true"),
Pair("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("x86", "x86_64", "armeabi-v7a", "arm64-v8a")
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
}
}
}
2021-02-10 21:38:32 +01:00
}
buildFeatures {
viewBinding = true
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.0.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
isJniDebuggable = true
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-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"
2021-08-24 15:44:12 +02:00
versionNameSuffix = "-beta12"
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")
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_release")
resValue("mipmap", "floris_app_icon_round", "@mipmap/ic_app_icon_release_round")
2021-02-10 21:38:32 +01:00
resValue("string", "floris_app_name", "@string/app_name")
}
}
testOptions {
unitTests {
isIncludeAndroidResources = true
}
}
lint {
2021-02-10 21:38:32 +01:00
isAbortOnError = false
}
}
dependencies {
2021-09-08 18:48:28 +02:00
implementation("androidx.activity:activity-compose:1.3.1")
implementation("androidx.activity:activity-ktx:1.3.1")
implementation("androidx.appcompat:appcompat:1.3.1")
implementation("androidx.autofill:autofill:1.1.0")
implementation("androidx.compose.material:material:1.0.2")
implementation("androidx.compose.ui:ui:1.0.2")
implementation("androidx.compose.ui:ui-tooling-preview:1.0.2")
implementation("androidx.constraintlayout:constraintlayout:2.1.0") // possibly remove after settings rework
implementation("androidx.core:core-ktx:1.6.0")
implementation("androidx.fragment:fragment-ktx:1.3.6") // possibly remove after settings rework
implementation("androidx.navigation:navigation-compose:2.4.0-alpha08")
2021-09-08 18:48:28 +02:00
implementation("androidx.preference:preference-ktx:1.1.1") // possibly remove after settings rework
implementation("androidx.lifecycle:lifecycle-service:2.3.1")
implementation("com.google.accompanist:accompanist-systemuicontroller:0.18.0")
2021-09-08 18:48:28 +02:00
implementation("com.google.android.flexbox:flexbox:3.0.0")
implementation("com.google.android.material:material:1.4.0")
implementation("com.jakewharton.timber:timber:4.7.1") // possibly remove after settings rework
implementation("com.jaredrummler:colorpicker:1.1.0") // possibly remove after settings rework
implementation("com.nambimobile.widgets:expandable-fab:1.0.2") // possibly remove after settings rework
2021-09-14 00:16:24 +02:00
implementation("dev.patrickgold.jetpref:jetpref-datastore-model:0.1.0-alpha03")
implementation("dev.patrickgold.jetpref:jetpref-ui-compose:0.1.0-alpha03")
2021-09-08 18:48:28 +02:00
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0")
implementation("androidx.room:room-runtime:2.3.0")
kapt("androidx.room:room-compiler:2.3.0")
2021-02-10 21:38:32 +01:00
2021-06-24 16:49:47 +02:00
testImplementation(kotlin("test"))
testImplementation("androidx.test", "core", "1.3.0")
2021-02-10 21:38:32 +01:00
testImplementation("org.mockito", "mockito-inline", "3.7.7")
testImplementation("org.robolectric", "robolectric", "4.5.1")
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")
}