Create Kotlin multiplatform mobile project from cli - kotlin-multiplatform

How to create a Kotlin multiplatform mobile project via command line in linux?
I installed Kotlin command-line compiler (kotlinc).
And Gradle build tool.
I add gradle and kotlin bin directory to my PATH.
Now, I would like to create an example multiplatform project. Is there any template I can use to set up the project structure?
For Gradle, I found good tutorial, such as to build CLI applications, but not mobile. On the Kotlin side, I found a nice tutorial by using the GUI.

Related

Add Andorid library to Jetpack Compose project, build failed with "Uninitialized.application.id" in Merged Manifest

I created a new compose project with "Empty Compose Activity" on Android Studio Arctic Fox 2020.3.1; then added a new Android library to the project. When I try to build the project, it says "Build: failed"
I found and fixed the issue after using command: ./gradlew build
This version (1.0.0) of the Compose Compiler requires Kotlin version 1.5.10 but you appear to be using Kotlin version 1.5.20 which is not known to be compatible. Please fix your configuration (or suppressKotlinVersionCompatibilityCheck but don't say I didn't warn you!).
It has nothing to do with “Uninitialized.application.id” in Merged Manifest

Add native library to local jar in gradle build

I am desperately trying to build an opencv-based gradle project but so far I have not been able to make it run successfully.
In this regard, I need to add a native library for the opencv-jar.
I compiled the local jar with
compile files('libs/opencv/mac/opencv-320.jar')
but always get the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java320 in java.library.path
Of course it is because I did not add the libopencv_java320.dylib on mac / .dll on windows native library to the .jar, which was absolutely no problem doing it manually. Is there a native gradle solution for my case? I did not find any plugin right now.

Building VS2017 .net core apps that target the full .net framework

I have created a asp.net mvc core app targeting the .net framework (not the multi platform core) as I want to include standard .net framework libraries and running cross platform is irrelevant to me as I will be hosting in Azure.
The solution looks like this:
I am trying to get a VSTS build working with this project (which is part of a larger solution) but when building I get the following error:
Which seems to be a common error. What should my build definition look like to build these .csproj based projects? There seems to be a lot of information but no definitive answer. Hopefully that answer can be here and people can stop looking elsewhere for information on how to get a Continuous Integration build going.
On a side note at the solution level I find no packages folder containing my nuget packages, why is this? The project definitely contains nuget packages.
Your project is using the newest MSBuild based project files for .NET Core.
The extension is still .csproj, but the XML schema is different than the ordinary .csproj used in .NET46 (and previous versions).
You need appropriate tooling to build such .csproj file, for example:
Visual Studio 2017: install it on your private build agent; VSTS hosted build agent does not have VS2017 installed yet;
.NET Core SDK 1.0.0-preview4-004233 (or more recent): this SDK contains the command line tool 'dotnet' for MSBuild .NET Core based projects.
Note in your build log that the msbuild used is the one shipped with VS2015 (version 14.0) instead, that does not support such .csproj format file.
On the other hand, if you do not need multiplatform nor any other benefit of .NET Core, why are you using it? Just created an ordinary ASP.NET 4 web project targetting .NET 4.6.

Hyperledger SDK for Java chaincode (shim-client-1.0)

I tried to compile chaincode sample and write my own one (https://github.com/hyperledger/fabric/tree/master/examples/chaincode/java/SimpleSample)
However, I can't get a shim-client-1.0. Do you have plans to make java sdk public?
I hope that “shim-client-1.0.jar” will be added to maven repository soon, nevertheless you can try to compile it using source code in “github.com/hyperledger/fabric/core/chaincode/shim/java”.
gradle build
and "shim-client-1.0.jar" will be available in github.com/hyperledger/fabric/core/chaincode/shim/java/build/lib folder.

How to build the Java wrapper for OpenCV 3.0?

I am using OpenCV 3.0 in my Java application through the opencv-300.jar and opencv_java300.dll. They come with the standard installation. But some extra modules are not in the standard installation. So I build an OpenCV 3.0 with the opencv-contrib repo.
But the build generates about 40 binaries. How can I generate something like opencv-300.jar and opencv_java300.dll for Java adoption? Do I need to turn to SWIG or something?
We can build OpenCV + extra modules with VS2013.
Extra modules can be downloaded from: https://github.com/Itseez/opencv_contrib/releases
Run "cmake-gui.exe" in VS2013 command prompt.
Click the "Configure" button.
Select VS2013 as the generation templaet.
Modify the config entries as necessary.
Click "Generate" to generate the VS2013 project files.
Open the generated project files and build.
Ref:
(*) http://answers.opencv.org/question/66571/how-to-build-the-java-wrapper-for-opencv-30/
http://answers.opencv.org/question/66630/javalangunsatisfiedlinkerror-when-using-binaries-built-from-source/
https://stackoverflow.com/questions/31508130/keypoints-was-cleared-after-descriptoerextractor

Resources