Comments (5)
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.
@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.
Very cool, I'll try it tomorrow morning first thing!!
:)
from koloboke.
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.
@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)
- Koloboke jar size HOT 4
- Getters supporting optimistic read locking (StampedLock)
- putAll not overriden HOT 2
- Is it possible to allocate exact capacity? HOT 1
- Allow to disable usage of sun.misc.Unsafe in koloboke compile
- What is the license Koloboke and Koloboke compiler shipped with? HOT 4
- Koloboke Compile: NullPointerException at compile time
- Redundant cast warning in code generated by KolobokeMap
- Koloboke Fails to Compile on Java 9 HOT 5
- Performance issues when copying between Koloboke sets HOT 2
- build error using ./gradlew :buildMeta HOT 1
- failed to build with error below HOT 2
- java.lang.ClassCastException in very specific case on compiled ObjIntMap<String>.keySet().retainAll(...) HOT 2
- Koloboke annotation issue running Chronicle XCL tests... HOT 1
- Incorrect behavior of MutableLHashSeparateKVLongObjMapGO cursor
- Could not initialize class com.koloboke.collect.map.hash.HashIntObjMaps$DefaultFactoryHolder HOT 1
- MutableQHashSeparateKVLongObjMap rehash BUG
- koloboke.com seems to point to a wrong website
- Can't build the project
- The project can not be built
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koloboke.