Closed nshmyrev closed 2 years ago
For details see https://jitpack.io/docs/ANDROID/ and https://jitpack.io/docs/BUILDING/
I am currently experimenting how to create a gradle only android lib that includes ndk and downloading the c++ source modules without the need for a bash script
@nshmyrev i have created https://github.com/k3b/vosk-api-jitpack.io as an attempt to create the lib in gradle only without any bash script.
Note that i have never worked before with android-ndk and cmake. the last time i programmed in c++ was 20 years ago (windows-3.0)
what i have done so far:
Created a new android project with a ndk subproject "vosk-api"
can you help me solving that issue
can you help me solving that issue
Hi, thank you for starting this. Some notes:
Thanks for reply.
The seperate project is just an experiment where i can play and learn without polluting the original.
I already learned about
I agree that building using jitpack.yml is probably much less effort than recreating the build in native gradle.
"jitpack.yml" is provider specific so it will not work with travis or under windows where there is no bash-shell.
I will try to learn more about android c++ integration.
Can you help me what should be put into OpenBLAS/CMakeLists.txt to android specific target lib.
if (???ANDROID???)
target_link_libraries(native-lib SHARED ?????)
endif ()
Can you help me what should be put into OpenBLAS/CMakeLists.txt to android specific target lib.
I don't think you need to put something specific. It is already there:
https://github.com/xianyi/OpenBLAS/blob/42f048cf6c04e51de6c7a3ade5af71b0c4dcea0d/CMakeLists.txt#L190
thanks.
i already found the solution. the error with missing "target" was a missing environment variable. i go on learning ....
I finally stopped trying to create a gradle-native-build because config.h is not generated in vosk-api/src/main/cpp/clonedRepositories/OpenBLAS/Makefile.system
I cannot do this without a coderewrite.
I hope that nshmyrev -s jitpack.yml aproach will work
I tried with jitpack.yml but it does not compile
publishing:
consumig as
but it does not compile
The log says you need to define ANDROID_NDK_HOME, probably also in jitpack.yml
The log says you need to define ANDROID_NDK_HOME, probably also in jitpack.yml
i thought that would be done with sdkmanager --install "ndk;21.3.6528147"
@k3b jitpack doesn't define ANROID_NDK_HOME, but it defines ANDROID_HOME. You can probably modify build-vosk.sh script like this:
ANDROID_NDK_HOME?=$ANDROID_HOME/ndk-bundle
and it should go forward
@nshmyrev have you tried to upload your aar lib via https://central.sonatype.org/publish/ ? it is among the trusted maven repos
Yeah, we had bad experience with sonatype before. I'd better go with jitpack. But I'm sorry I didn't had time to check yet.
Is anyone still working on this? I'd like to publish the Dicio assistant on F-Droid but that needs this issue to be resolved. If nobody is working on it I might try myself, though I don't have much experience with build scripts and NDK.
Is anyone still working on this?
No, I don't think so
I'd like to publish the Dicio assistant on F-Droid but that needs this issue to be resolved.
Cool app!
Please try and let me know if you need any help. If it doesn't work, maybe I'll register to sonatype in the end, not sure.
I decided to go ahead with sonatype. Created an issue at https://issues.sonatype.org/browse/OSSRH-74850
Done https://s01.oss.sonatype.org/content/repositories/releases/com/alphacephei/vosk-android/0.3.32/, not sure if it is public already or not
We are on mavencentral already
https://repo1.maven.org/maven2/com/alphacephei/vosk-android/
Thank you very much :-D
Thank you @Stypox, your patch was extremely helpful
So we can distribute things for F-droid, see
https://forum.f-droid.org/t/google-voice-foss-replica/13629/8