2025-01-19 18:15:58 +01:00
|
|
|
plugins {
|
|
|
|
id("com.android.application")
|
|
|
|
kotlin("android")
|
|
|
|
kotlin("plugin.serialization") version "2.0.21"
|
2025-02-09 13:27:55 +01:00
|
|
|
kotlin("plugin.compose") version "2.0.0"
|
2025-01-19 18:15:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2025-03-26 19:56:46 +01:00
|
|
|
compileSdk = 35
|
2025-01-19 18:15:58 +01:00
|
|
|
buildToolsVersion = "34.0.0"
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "helium314.keyboard"
|
|
|
|
minSdk = 21
|
2025-03-26 19:56:46 +01:00
|
|
|
targetSdk = 35
|
2025-03-29 10:38:43 +01:00
|
|
|
versionCode = 3003
|
2025-03-26 21:26:05 +01:00
|
|
|
versionName = "3.0-alpha3"
|
2025-01-19 18:15:58 +01:00
|
|
|
ndk {
|
|
|
|
abiFilters.clear()
|
|
|
|
abiFilters.addAll(listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64"))
|
|
|
|
}
|
|
|
|
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
isMinifyEnabled = true
|
|
|
|
isShrinkResources = false
|
|
|
|
isDebuggable = false
|
|
|
|
isJniDebuggable = false
|
|
|
|
}
|
|
|
|
create("nouserlib") { // same as release, but does not allow the user to provide a library
|
|
|
|
isMinifyEnabled = true
|
|
|
|
isShrinkResources = false
|
|
|
|
isDebuggable = false
|
|
|
|
isJniDebuggable = false
|
|
|
|
}
|
|
|
|
debug {
|
|
|
|
isMinifyEnabled = true
|
|
|
|
isJniDebuggable = false
|
|
|
|
applicationIdSuffix = ".debug"
|
|
|
|
}
|
|
|
|
create("runTests") { // build variant for running tests on CI that skips tests known to fail
|
|
|
|
isMinifyEnabled = true
|
|
|
|
isJniDebuggable = false
|
|
|
|
}
|
|
|
|
base.archivesBaseName = "HeliBoard_" + defaultConfig.versionName
|
|
|
|
}
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
viewBinding = true
|
|
|
|
buildConfig = true
|
2025-02-09 13:27:55 +01:00
|
|
|
compose = true
|
2025-01-19 18:15:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
path = File("src/main/jni/Android.mk")
|
|
|
|
}
|
|
|
|
}
|
2025-03-26 21:26:05 +01:00
|
|
|
ndkVersion = "28.0.13004108"
|
2025-01-19 18:15:58 +01:00
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
jniLibs {
|
|
|
|
// shrinks APK by 3 MB, zipped size unchanged
|
|
|
|
useLegacyPackaging = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
testOptions {
|
|
|
|
unitTests {
|
|
|
|
isIncludeAndroidResources = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
}
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
|
|
}
|
|
|
|
|
|
|
|
// see https://github.com/Helium314/HeliBoard/issues/477
|
|
|
|
dependenciesInfo {
|
|
|
|
includeInApk = false
|
|
|
|
includeInBundle = false
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace = "helium314.keyboard.latin"
|
|
|
|
lint {
|
|
|
|
abortOnError = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// androidx
|
2025-03-26 19:56:46 +01:00
|
|
|
implementation("androidx.core:core-ktx:1.15.0")
|
|
|
|
implementation("androidx.recyclerview:recyclerview:1.4.0")
|
2025-01-19 18:15:58 +01:00
|
|
|
implementation("androidx.autofill:autofill:1.1.0")
|
|
|
|
|
|
|
|
// kotlin
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0")
|
|
|
|
|
2025-02-09 13:27:55 +01:00
|
|
|
// compose
|
2025-03-04 22:19:17 +01:00
|
|
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
2025-02-23 18:38:07 +01:00
|
|
|
implementation(platform("androidx.compose:compose-bom:2025.02.00"))
|
2025-02-09 13:27:55 +01:00
|
|
|
implementation("androidx.compose.material3:material3")
|
|
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
2025-03-04 22:19:17 +01:00
|
|
|
implementation("androidx.navigation:navigation-compose:2.8.8")
|
|
|
|
implementation("sh.calvin.reorderable:reorderable:2.4.3") // for easier re-ordering
|
2025-02-09 13:27:55 +01:00
|
|
|
implementation("com.github.skydoves:colorpicker-compose:1.1.2") // for user-defined colors
|
|
|
|
|
2025-01-19 18:15:58 +01:00
|
|
|
// test
|
2025-01-19 18:27:31 +01:00
|
|
|
testImplementation(kotlin("test"))
|
2025-01-19 18:15:58 +01:00
|
|
|
testImplementation("junit:junit:4.13.2")
|
|
|
|
testImplementation("org.mockito:mockito-core:5.15.2")
|
2025-03-26 20:38:06 +01:00
|
|
|
testImplementation("org.robolectric:robolectric:4.14.1")
|
2025-01-19 18:15:58 +01:00
|
|
|
testImplementation("androidx.test:runner:1.6.2")
|
|
|
|
testImplementation("androidx.test:core:1.6.1")
|
|
|
|
}
|