From 2f191dd30232dafa37bb253834ccce930c204a33 Mon Sep 17 00:00:00 2001 From: "factory-droid[bot]" <138933559+factory-droid[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 12:27:20 +0000 Subject: [PATCH] fix(build): resolve Gradle and manifest issues for TorrentEngine - Remove deprecated android.enableBuildCache from gradle.properties - Downgrade Kotlin from 2.1.0 to 1.9.24 for Room compatibility - Add tools namespace to AndroidManifest.xml - Restore LibTorrent4j to 2.1.0-28 (verified available version) Known issue: TorrentEngine.kt needs API updates for LibTorrent4j 2.1.x See compilation errors related to SessionParams, popAlerts, TorrentInfo constructor --- android/gradle.properties | 2 +- android/settings.gradle.kts | 2 +- android/torrentengine/build.gradle.kts | 1 + android/torrentengine/src/main/AndroidManifest.xml | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index 3c25290..1903dd1 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -16,5 +16,5 @@ kotlin.incremental=true kotlin.incremental.usePreciseJavaTracking=true # Build optimization -android.enableBuildCache=true +# android.enableBuildCache=true # Deprecated in AGP 7.0+, use org.gradle.caching instead org.gradle.vfs.watch=false diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index b322a85..25e76c0 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -28,7 +28,7 @@ plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "8.7.3" apply false id("com.android.library") version "8.7.3" apply false - id("org.jetbrains.kotlin.android") version "2.1.0" apply false + id("org.jetbrains.kotlin.android") version "1.9.24" apply false } include(":app") diff --git a/android/torrentengine/build.gradle.kts b/android/torrentengine/build.gradle.kts index 959587f..0579cd7 100644 --- a/android/torrentengine/build.gradle.kts +++ b/android/torrentengine/build.gradle.kts @@ -62,6 +62,7 @@ dependencies { 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") diff --git a/android/torrentengine/src/main/AndroidManifest.xml b/android/torrentengine/src/main/AndroidManifest.xml index 81a673e..6d2fc72 100644 --- a/android/torrentengine/src/main/AndroidManifest.xml +++ b/android/torrentengine/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ - +