Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
group 'dev.netdur.llama_cpp_dart'
version '1.0'

buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.0'
}
}

rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}

apply plugin: 'com.android.library'

android {
namespace 'dev.netdur.llama_cpp_dart'
compileSdkVersion 34

defaultConfig {
minSdkVersion 26
}
}
3 changes: 3 additions & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.netdur.llama_cpp_dart">
</manifest>
Binary file not shown.
Binary file not shown.
Binary file added android/src/main/jniLibs/arm64-v8a/libggml.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/src/main/jniLibs/arm64-v8a/libllama.so
Binary file not shown.
Binary file added android/src/main/jniLibs/arm64-v8a/libmtmd.so
Binary file not shown.
Binary file added android/src/main/jniLibs/x86_64/libggml-base.so
Binary file not shown.
Binary file added android/src/main/jniLibs/x86_64/libggml-cpu.so
Binary file not shown.
Binary file added android/src/main/jniLibs/x86_64/libggml.so
Binary file not shown.
Binary file added android/src/main/jniLibs/x86_64/libllama.so
Binary file not shown.
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ ffigen:
flutter:
plugin:
platforms:
android:
ffiPlugin: true
ios:
ffiPlugin: true
macos:
Expand Down
2 changes: 1 addition & 1 deletion tool/build_android_aar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ done

# Auto-discover NDK if not specified.
if [[ -z "$NDK" ]]; then
CANDIDATE="/Users/adel/Library/Android/sdk/ndk"
CANDIDATE="$HOME/Library/Android/sdk/ndk"
if [[ -d "$CANDIDATE" ]]; then
# Pick the lexicographically-largest version (safe enough for our SDKs).
NDK="$CANDIDATE/$(ls -1 "$CANDIDATE" | sort -V | tail -1)"
Expand Down