-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/KotlinUnifi: building with ./build-kotlin.sh
fails
#1
Comments
The build-kotlin.sh file was initially used to create the kotlin bindings, those bindings are already included in the wrapper as it is right now and so you do not necessarily have to run that script. It is important to note that you need to have docker desktop installed and running in order for the cross command in the scripts to run. The better alternative since the bindings are already generated is the build-targets.sh file inside of the ./wrapper/kotlin folder. This will build for iOS and Android and the resulting build files will be in the ./targets folder. The next step will be to run the build-universal.sh file in the root of the project. This builds a universal dylib for macOS that allows you to run the tests on your machine rather than a simulator or jvm. If for some reason you do not want to do that the build.gradle.kts will have to be adjusted to not try to copy from that folder and then comment the macOS section out. Once you have all of the binaries built you must create a jniLibs folder inside of ./wrapper/kotlin/src/androidMain and create four folders and copy the correct binaries into the folder. The folders to create are "arm64-v8a", "armeabi-v7a", "x86", "x86_64" then from the corresponding folders in the ./targets you need to copy the libaries_askar.so and libaries_askar.a into each of the folders you created, just the .so and .a from the matching dir in ./target are required. Once that is done you should be able to open the ./wrappers/kotlin in an IDE, we used intellij idea, and run the tests. If you used idea then you will want to make sure the IDE creates a local.properties file that has a variable pointing to your android sdk install location. "sdk.dir="Path/on/your/machine". One thing to note is that with idea we are able to run the tests on either macOS, jvm, or iOS simulator. To run on android the tests are configured to run as android instrumented tests which require a physical device to be plugged into your machine. This is just done by changing the run configuration in the top right to run android instrumented all tests. Once all tests are running and working the project should be able to be used as a dependency for another project. There is some configuration in the build.gradle.kts of the project to publish the project to a maven repo but it has not yet been done and requires additional set up to publish. |
Building all of the targets can take over an hour. |
I was able to build all, but after a several retries. It fails randomly, but continues after restart. I tried on MacOS (M1). |
Strange, do you have any of the logs from the fails available? |
The issues are very strange indeed, here is the output, I restarted it from begining:
|
While attempting to build the Kotlin wrapper from the https://github.com/Indicio-tech/aries-askar/tree/feat/KotlinUniffi branch with
./build-kotlin.sh
, the script fails while compiling (duringcross build
)The text was updated successfully, but these errors were encountered: