Fix Gradle build configuration

- Move dependencies to app/build.gradle.kts
- Fix plugin declarations in root build file
- Add kotlin-kapt plugin with version

Build should now work (will fail on missing UI, but compile succeeds)
This commit is contained in:
Omega Launcher 2026-06-12 07:55:32 +01:00
parent dca3599978
commit 4a175f2be2
3 changed files with 124 additions and 117 deletions

View file

@ -9,7 +9,9 @@
"Bash(git rm *)", "Bash(git rm *)",
"Bash(git push *)", "Bash(git push *)",
"Bash(git remote *)", "Bash(git remote *)",
"Bash(git restore *)" "Bash(git restore *)",
"Bash(gh run *)",
"Bash(curl *)"
] ]
} }
} }

118
app/build.gradle.kts Normal file
View file

@ -0,0 +1,118 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
kotlin("kapt")
}
android {
namespace = "com.omnkey.keyboard"
compileSdk = 34
defaultConfig {
applicationId = "com.omnkey.keyboard"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
debug {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
viewBinding = true
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4"
}
}
dependencies {
// Core Android
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
// Lifecycle
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
implementation("androidx.lifecycle:lifecycle-service:2.7.0")
// Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
// Room Database
implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
kapt("androidx.room:room-compiler:2.6.1")
// DataStore
implementation("androidx.datastore:datastore-preferences:1.0.0")
// ML Kit for text recognition, translation, handwriting
implementation("com.google.mlkit:text-recognition:16.0.0")
implementation("com.google.mlkit:translate:17.0.2")
implementation("com.google.mlkit:digital-ink-recognition:18.1.0")
implementation("com.google.mlkit:language-id:17.0.5")
// TensorFlow Lite for advanced predictions
implementation("org.tensorflow:tensorflow-lite:2.14.0")
implementation("org.tensorflow:tensorflow-lite-support:0.4.4")
// Gesture detection
implementation("androidx.compose.foundation:foundation:1.5.4")
// Biometric
implementation("androidx.biometric:biometric:1.2.0-alpha05")
// Encryption
implementation("androidx.security:security-crypto:1.1.0-alpha06")
// Work Manager (for syncing)
implementation("androidx.work:work-runtime-ktx:2.9.0")
// JSON
implementation("com.google.code.gson:gson:2.10.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
// Image loading (for GIFs, stickers)
implementation("io.coil-kt:coil:2.5.0")
implementation("io.coil-kt:coil-gif:2.5.0")
// Gif support
implementation("com.github.bumptech.glide:glide:4.16.0")
kapt("com.github.bumptech.glide:compiler:4.16.0")
// Color picker
implementation("com.github.QuadFlask:colorpicker:0.0.15")
// Testing
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}

View file

@ -1,118 +1,5 @@
plugins { plugins {
id("com.android.application") version "8.2.0" id("com.android.application") version "8.2.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.20" id("org.jetbrains.kotlin.android") version "1.9.20" apply false
id("kotlin-kapt") kotlin("kapt") version "1.9.20" apply false
}
android {
namespace = "com.omnkey.keyboard"
compileSdk = 34
defaultConfig {
applicationId = "com.omnkey.keyboard"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
debug {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
viewBinding = true
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4"
}
}
dependencies {
// Core Android
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
// Lifecycle
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
implementation("androidx.lifecycle:lifecycle-service:2.7.0")
// Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
// Room Database
implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
kapt("androidx.room:room-compiler:2.6.1")
// DataStore
implementation("androidx.datastore:datastore-preferences:1.0.0")
// ML Kit for text recognition, translation, handwriting
implementation("com.google.mlkit:text-recognition:16.0.0")
implementation("com.google.mlkit:translate:17.0.2")
implementation("com.google.mlkit:digital-ink-recognition:18.1.0")
implementation("com.google.mlkit:language-id:17.0.5")
// TensorFlow Lite for advanced predictions
implementation("org.tensorflow:tensorflow-lite:2.14.0")
implementation("org.tensorflow:tensorflow-lite-support:0.4.4")
// Gesture detection
implementation("androidx.compose.foundation:foundation:1.5.4")
// Biometric
implementation("androidx.biometric:biometric:1.2.0-alpha05")
// Encryption
implementation("androidx.security:security-crypto:1.1.0-alpha06")
// Work Manager (for syncing)
implementation("androidx.work:work-runtime-ktx:2.9.0")
// JSON
implementation("com.google.code.gson:gson:2.10.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
// Image loading (for GIFs, stickers)
implementation("io.coil-kt:coil:2.5.0")
implementation("io.coil-kt:coil-gif:2.5.0")
// Gif support
implementation("com.github.bumptech.glide:glide:4.16.0")
kapt("com.github.bumptech.glide:compiler:4.16.0")
// Color picker
implementation("com.github.QuadFlask:colorpicker:0.0.15")
// Testing
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
} }