Giter Club home page Giter Club logo

Comments (2)

gkdn avatar gkdn commented on May 18, 2024 1

java_binary's deploy target is the one used for deployment:
https://docs.bazel.build/versions/2.0.0/tutorial/java.html#package-a-java-target-for-deployment

Also see:
https://docs.bazel.build/versions/master/be/java.html#java_binary_implicit_outputs

w.r.t size:
J2CL deps are not fine tuned for open-source and brings whole maven dependencies into deployment jar. This could be optimized but wasn't a concern for us so far.

from j2cl.

bugok avatar bugok commented on May 18, 2024

@cgrushko helped me look at the output and we realized that:

  • I could build the J2clCommandLineRunner_deploy.jar rule and use that jar, alongside with the wrapper script.
  • The runfiles include a copy of the JRE, which we don't (really?) need.
  • I edited the J2clCommandLineRunner script to remove the need of the runtime files as well as set the JAVABIN variable to $(which java).

This got me here:

$ ll
total 26424
-r-x--x--x. 1 XXX users    14177 Feb  3 03:48 J2clCommandLineRunner
-r-xr-xr-x. 1 XXX users 27040744 Feb  3 03:48 J2clCommandLineRunner_deploy.jar
$ du . -sh
26M	.
$ ./J2clCommandLineRunner --singlejar
Error: Argument "<source files>" is required
Usage: j2cl <options> <source files>
use -help for a list of possible options
1 error(s), 0 warning(s).
$

Maybe some of my assumptions are wrong here - but maybe this is good enough.

Closing the issue.

from j2cl.

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.