Code Monkey home page Code Monkey logo

Comments (5)

leventov avatar leventov commented on June 3, 2024

Thanks you.

Yes, it is possible, but it is not simple, requires to edit gradle configs and deep understanding of the library structure to fix compilation errors you will face on this way.

As an alternative, your can use the whole lib and shrink your application with ProGuard.

If both ways are unacceptable, I have an idea of another solution for this problem, but it is not yet implemented and not public. Will be publicised not less than in a couple of months, likely even longer time.

from koloboke.

leventov avatar leventov commented on June 3, 2024

@h2000 Ok, here is the solution for your specific case, I hope it will help you and people with same questions with different sets of needed specializations:

Note: this is verified only for master at dd2db28 and key={int,long} value={int,long,double} configuration. Also I sacrificed precision of the shrink (hence jar sizes) for simplicity:

$ git clone [email protected]:OpenHFT/Koloboke.git
$ cd Koloboke
$ ./gradlew :buildMeta

Then open lib/build.gradle and add two lines to configure(jpsgTasks) block:

configure(jpsgTasks) {
    // ..prev lines unchanged
    never 'byte|char|short|float'
    exclude 'key=double|obj,value=int|long|double|obj', 'key=int|long,value=obj'
}

Then return to the command line:

$ cd lib
$ ../gradlew buildMain -x findbugsMain -x findbugsTest

Then you have 120 KB koloboke-api-jdk6-7-0.6.2.jar in api/build/libs/ dir and 2.6 MB koloboke-impl-jdk6-7-0.6.2.jar in impl/build/libs/.

from koloboke.

h2000 avatar h2000 commented on June 3, 2024

Very cool, I'll try it tomorrow morning first thing!!
:)

from koloboke.

h2000 avatar h2000 commented on June 3, 2024

Could not wait ;). It compiles successfully. I used:
../gradlew buildMain -x findbugsMain -x findbugsTest -x javadoc

If javadoc is activitated, it failed with:

:lib:api:javadoc
HOME/hft-java/Koloboke/lib/api/src/main/java/net/openhft/koloboke/collect/Equivalence.java:308: error: reference not found
     * It is needed because, for example, {@link net.openhft.koloboke.collect.map.ObjObjMap}'s
                                                 ^
HOME/hft-java/Koloboke/lib/api/build/generated-src/jpsg/main/java/net/openhft/koloboke/function/DoubleBinaryOperator.java:28: error: reference not found
 * in {@link net.openhft.koloboke.collect.map.ObjDoubleMap#merge(Object, double, DoubleBinaryOperator)}
             ^
HOME/hft-java/Koloboke/lib/api/build/generated-src/jpsg/main/java/net/openhft/koloboke/function/DoubleDoubleToDoubleFunction.java:32: error: reference not found
 * in {@link net.openhft.koloboke.collect.map.DoubleDoubleMap#compute(double, DoubleDoubleToDoubleFunction)}
             ^
HOME/hft-java/Koloboke/lib/api/build/generated-src/jpsg/main/java/net/openhft/koloboke/function/IntBinaryOperator.java:28: error: reference not found
 * in {@link net.openhft.koloboke.collect.map.ObjIntMap#merge(Object, int, IntBinaryOperator)}
             ^
HOME/hft-java/Koloboke/lib/api/build/generated-src/jpsg/main/java/net/openhft/koloboke/function/LongBinaryOperator.java:28: error: reference not found
 * in {@link net.openhft.koloboke.collect.map.ObjLongMap#merge(Object, long, LongBinaryOperator)}
             ^
5 errors
:lib:api:javadoc FAILED

from koloboke.

leventov avatar leventov commented on June 3, 2024

@h2000 Good catch. I haven't experienced that probably because I use Java 6 javadoc executable, which treat such problems as warnings by default, Java 8 javadoc became less tolerant by default. If you need Javadocs generated, configure javadoc { failOnError = false } in libs/api/build.gradle file.

from koloboke.

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.