mirror of
https://gitlab.com/foxixus/neomovies_mobile.git
synced 2025-10-28 03:18:49 +05:00
PROBLEM RESOLVED: - KAPT task ':torrentengine:kaptReleaseKotlin' was failing due to kotlinx-metadata-jvm version incompatibility - Error: 'Provided Metadata instance has version 2.1.0, while maximum supported version is 2.0.0' SOLUTION: - Updated Room from 2.6.1 to 2.7.0-alpha09 which supports Kotlin 2.1.0 metadata - Added KAPT configuration block with correctErrorTypes and useBuildCache optimizations - Kept KAPT instead of migrating to KSP as requested TESTING: - ✅ gradle :torrentengine:kaptDebugKotlin - SUCCESS - ✅ gradle :torrentengine:assembleDebug - SUCCESS - ✅ Local KAPT compilation works (falls back to Kotlin 1.9 in Alpha mode) The build now passes KAPT processing successfully while maintaining KAPT for annotation processing as requested.
83 lines
2.6 KiB
Plaintext
83 lines
2.6 KiB
Plaintext
plugins {
|
|
id("com.android.library")
|
|
id("org.jetbrains.kotlin.android")
|
|
kotlin("kapt")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.neomovies.torrentengine"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
minSdk = 21
|
|
targetSdk = 34
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
consumerProguardFiles("consumer-rules.pro")
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
// KAPT configuration for Kotlin 2.1.0 compatibility
|
|
kapt {
|
|
correctErrorTypes = true
|
|
useBuildCache = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Core Android dependencies
|
|
implementation("androidx.core:core-ktx:1.15.0")
|
|
implementation("androidx.appcompat:appcompat:1.7.0")
|
|
implementation("com.google.android.material:material:1.12.0")
|
|
|
|
// Coroutines for async operations
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.1")
|
|
|
|
// Lifecycle components
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
|
implementation("androidx.lifecycle:lifecycle-service:2.8.7")
|
|
|
|
// Room database for torrent state persistence - updated for Kotlin 2.1.0
|
|
implementation("androidx.room:room-runtime:2.7.0-alpha09")
|
|
implementation("androidx.room:room-ktx:2.7.0-alpha09")
|
|
kapt("androidx.room:room-compiler:2.7.0-alpha09")
|
|
|
|
// WorkManager for background tasks
|
|
implementation("androidx.work:work-runtime-ktx:2.10.0")
|
|
|
|
// Gson for JSON parsing
|
|
implementation("com.google.code.gson:gson:2.11.0")
|
|
|
|
// LibTorrent4j - Java bindings for libtorrent
|
|
// Using main package which includes native libraries
|
|
implementation("org.libtorrent4j:libtorrent4j:2.1.0-28")
|
|
implementation("org.libtorrent4j:libtorrent4j-android-arm64:2.1.0-28")
|
|
implementation("org.libtorrent4j:libtorrent4j-android-arm:2.1.0-28")
|
|
implementation("org.libtorrent4j:libtorrent4j-android-x86:2.1.0-28")
|
|
implementation("org.libtorrent4j:libtorrent4j-android-x86_64:2.1.0-28")
|
|
|
|
// Testing
|
|
testImplementation("junit:junit:4.13.2")
|
|
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
|
|
}
|