appmattus / layercache Goto Github PK
View Code? Open in Web Editor NEWCaching made simple for Android and Java.
License: Apache License 2.0
Caching made simple for Android and Java.
License: Apache License 2.0
Configuration 'compile' in project ':layercache-android' is deprecated. Use 'implementation' instead.
See https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations for details.
pom generation doesn't currently work if these are updated.
Add the following extensions to simply some use case:
suspend fun <Value : Any> Cache<Unit, Value>.get() = get(Unit)
suspend fun <Value : Any> Cache<Unit, Value>.set(value: Value) = set(Unit, value)
Linked to Kotlin/dokka#197 and Kotlin/dokka#224. SHould be fixed in 0.9.16
Using bintrayUpload automatically generates javadoc jars, however as the project is Kotlin only the content is empty.
Look at Dokka to generate this instead
Exception: java.lang.NullPointerException: chain == null
https://stackoverflow.com/questions/39119848/chain-is-null-when-retrieving-private-key
Exception: java.lang.IllegalStateException: could not generate key in keystore
https://issuetracker.google.com/issues/37051017
Caused by: java.security.UnrecoverableKeyException: Failed to obtain information about private key
https://stackoverflow.com/questions/36652675/java-security-unrecoverablekeyexception-failed-to-obtain-information-about-priv/36747600#36747600
Caused by: java.security.ProviderException: Failed to generate self-signed certificate
more
Caused by: java.lang.IllegalArgumentException: invalid date string: Unparseable date: "aheac
gbidiGMT+00:00" (at offset 0)
https://issuetracker.google.com/issues/37095309
Investigate using ProGuard to perform bytecode optimisation of the generated jars, but not obfuscation. See https://skillsmatter.com/skillscasts/10012-a-talk-by-jake-wharton
When we included the test class EncryptedSharedPreferencesCacheIntegrationShould.kt we get the below exception.
If you have faced similar issue then, kindly share the steps
java.security.NoSuchProviderException: JCE cannot authenticate the provider AndroidKeyStore
at javax.crypto.JceSecurity.getInstance(JceSecurity.java:105)
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:265)
at androidx.security.crypto.MasterKeys.generateKey(MasterKeys.java:138)
at androidx.security.crypto.MasterKeys.getOrCreate(MasterKeys.java:97)
at androidx.security.crypto.MasterKey$Builder.buildOnM(MasterKey.java:357)
at androidx.security.crypto.MasterKey$Builder.build(MasterKey.java:314)
at com.appmattus.layercache.EncryptedSharedPreferencesCacheIntegrationShould.<init>(EncryptedSharedPreferencesCacheIntegrationShould.kt:42)
at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:250)
at org.robolectric.RobolectricTestRunner$HelperTestRunner.createTest(RobolectricTestRunner.java:561)
at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:260)
at org.junit.runners.BlockJUnit4ClassRunner$2.runReflectiveCall(BlockJUnit4ClassRunner.java:309)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:306)
at org.robolectric.internal.SandboxTestRunner$HelperTestRunner.methodBlock(SandboxTestRunner.java:344)
at org.robolectric.RobolectricTestRunner$HelperTestRunner.methodBlock(RobolectricTestRunner.java:570)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:274)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.jar.JarException: Class is on the bootclasspath
at javax.crypto.JarVerifier.verify(JarVerifier.java:286)
at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:164)
at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:190)
at javax.crypto.JceSecurity.getInstance(JceSecurity.java:102)
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:265)
at androidx.security.crypto.MasterKeys.$$robo$$androidx_security_crypto_MasterKeys$generateKey(MasterKeys.java:138)
at androidx.security.crypto.MasterKeys.generateKey(MasterKeys.java)
at androidx.security.crypto.MasterKeys.$$robo$$androidx_security_crypto_MasterKeys$getOrCreate(MasterKeys.java:97)
at androidx.security.crypto.MasterKeys.getOrCreate(MasterKeys.java)
at androidx.security.crypto.MasterKey$Builder.$$robo$$androidx_security_crypto_MasterKey_Builder$buildOnM(MasterKey.java:357)
at androidx.security.crypto.MasterKey$Builder.buildOnM(MasterKey.java)
at androidx.security.crypto.MasterKey$Builder.$$robo$$androidx_security_crypto_MasterKey_Builder$build(MasterKey.java:314)
at androidx.security.crypto.MasterKey$Builder.build(MasterKey.java)
at com.appmattus.layercache.EncryptedSharedPreferencesCacheIntegrationShould.(EncryptedSharedPreferencesCacheIntegrationShould.kt:42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Should any functions be prefixed with infix? https://medium.com/@julianknodt/kotlin-infix-and-operator-3b0295777af4
Please Provide a sample code to implement.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.