Coder Social home page Coder Social logo

Handling native dependencies about jdeploy HOT 6 OPEN

mipastgt avatar mipastgt commented on September 21, 2024
Handling native dependencies

from jdeploy.

Comments (6)

shannah avatar shannah commented on September 21, 2024 1

I've been experimenting with adding support for install-time maven dependency resolution, which would give quite a bit of flexibility here. So far, I've added support for adding a list of maven dependencies (and repositories) to the package.json so that it will use Maven to resolve the app dependencies at the app's install time. This works well, but before releasing, I'm going to try to add support for adding a .jdeploy/maven/pom.xml file to your project which will be used (if present) for dependency resolution.

The benefits of this is that your app only needs to download what it needs on update/install - If only one library has changed, then it only needs to download that library.

Maven also makes it possible to download only the libraries for the current platform.

ETA a couple of weeks for preview.

from jdeploy.

mipastgt avatar mipastgt commented on September 21, 2024

I knew that "a couple" is not necessarily just two :-) but could you provide some update on this issue? I'd be interested to give it a try with a JetBrains Compose Desktop app which carries SQLite and the large Skia native library with it.

from jdeploy.

shannah avatar shannah commented on September 21, 2024

First, it is worth noting that jDeploy handles native dependencies find. You can bundle them in your jar files using the typical methods that developers normally use.

The issue here is one of efficiency - the desire to only package the native libs for the runtime platform.

This is where I've been experimenting with maven dependencies. I.e. downloading dependencies using maven, which allows it to only download the dependencies required for the current platform.

I got maven dependencies working but I'm not quite happy with some aspects of them yet. I am using them under the hood for the javafxVersion attribute (that allows you to expicitly set the javafx version).

Do you have a repository with a Jetbrains compose desktop app that I can try to get working with jDeploy?

from jdeploy.

mipastgt avatar mipastgt commented on September 21, 2024

Of course this is just an issue of efficiency but a critical one when the native parts are getting very large. The main problem here is the big native Skia library which is used for all rendering and which needs to shipped with the application somehow.

I have set up a little desktop example for you:
https://github.com/mipastgt/PolySpiralDesktop

It already can create an uber-jar as shown in the readme. The setup follows the latest template from JetBrains.

Many thanks in advance for having a look into this issue. I think there could be a big market for jDeploy here if this issue could be resolved.

from jdeploy.

shannah avatar shannah commented on September 21, 2024

Thanks for the sample project. I'm working on being able to produce an executable jar file with it, but am hitting some issues. I've posted this question in the Jetpack compose forum:

JetBrains/compose-multiplatform#2952

from jdeploy.

mipastgt avatar mipastgt commented on September 21, 2024

It seems you just can't use wildcards in the manifest. See, e.g.: https://stackoverflow.com/questions/15930782/call-java-jar-myfile-jar-with-additional-classpath-option You will have to list all jars explicity.
See also: https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html

from jdeploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.