Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android / Gradle updates (current working build) #49

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

danielweck
Copy link
Member

@danielweck danielweck commented Nov 19, 2018

Upgraded API 26 to 28, build tools to 28.0.3, Gradle 5.4.1, max processors / thread 6 (native NDK compiler). NDK is version 16.1.4479499:
https://github.com/android/ndk/wiki/Unsupported-Downloads#r16b
https://developer.android.com/ndk/downloads/older_releases#ndk-16b-downloads

Pre-requisite (must read comments, notably the "Build output" section):
readium/readium-sdk#317

platform/android/local.properties

(not checked into Git, must be created by developers)

sdk.dir=/PATH_TO/Android/sdk
ndk.dir=/PATH_TO/Android/sdk/ndk-bundle-old
readium.ndk_clang=false
readium.ndk_skipX86=false
readium.ndk_skipARM=false
readium.ndk_experimental=false

readium.sdk_lib_dir=/PATH_TO/SDKLauncher-Android/readium-sdk/Platform/Android/epub3/libs/
readium.sdk_include_dir=/PATH_TO/SDKLauncher-Android/readium-sdk/Platform/Android/epub3/include/

Build output

When invoking gradlew assembleDebug, a successful build output libs into the platform/android/lib/libs/ folder (armeabi-v7a and x86 subfolders), but there are also build artifacts in the platform/android/lib/build/outputs/aar folder (note that launching the SDKLauncher-Android app from AndroidStudio also invokes the LCP Gradle build script):

lcp-arm7-debug.aar
lcp-x86-debug.aar

lib-arm7-debug.aar
lib-x86-debug.aar   

Finally, there is also a platform/android/dist/ folder generated by the production build script:
https://github.com/readium/readium-lcp-client/blob/feature/latest-working-build-config/platform/android/lib/build.gradle#L174

…28, build tools to 28.0.3, Gradle 4.10.2, max processors / thread 6 (native NDK compiler), see readium/readium-sdk#317
@danielweck
Copy link
Member Author

danielweck commented Jun 12, 2019

…o lib which excludes ReadiumSDK / content module + filter)
…sts existing user keys available in the secret vault (as opposed to the codepath that uses the passphrase to unlock the license), see #51
@danielweck
Copy link
Member Author

This Pull Request also fixes #51
See commit: f89dcac

@danielweck
Copy link
Member Author

This PR also addresses the general issue of verifying that UTF8 characters are valid before comparing them (LCP keycheck is the prime example!)
1c4bb3f

…LCP license is undefined (absent property). The bug was due to the RapidJSON move semantics not copying the allocator in Value objects (only in Document objects) when return a function value. Works fine in function parameters, due to the stacking memory context. Without this fix, the GetType() function returns 16 (or some other weird value) instead of zero for kNullType enum, and isNull() returns false due to internal mismatch in the mask value. https://github.com/Tencent/rapidjson/blob/master/include/rapidjson/document.h#L1954 https://rapidjson.org/md_doc_tutorial.html#TemporaryValues Tencent/rapidjson#387 (comment)
…ly padding (W3C with zeros or PKCS), as opposed to partial padding. In other words, zero-padding actually never occurs (even for cypher data that is exactly a multiple of block size), instead a full block is allocated and suffixed to the cypher stream. The general case of partial padding between 1-15 bytes was working fine, this fix adds support for the edge case of zero-padding (full 16-bytes padding block)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant