readium-sdk
readium-sdk copied to clipboard
Maven packages
This change simply adds a few Maven POM files that will produce standard Java jar files that can be deployed to any Maven repository. This allows anyone using Maven (or a build system that uses Maven packages such as Gradle) to access the Android APIs and native library without having to import sources, or manually attach libraries to their project. They simply declare a dependency in their project files, and their build system fetches and handles all packaging for them.
The change is entirely opt-in: If you don't run Maven, you won't see anything new.
Just out of interest, what changes would be required int this Maven artifact definition, to include target platforms other than armeabi-v7a
(e.g. x86)?
I forgot to mention the x86
feature branches:
https://github.com/readium/SDKLauncher-Android/tree/feature/android-NDK-x86
https://github.com/readium/readium-sdk/tree/feature/android-NDK-x86
I'd need to add a line to the pom to pull in the x86
binary too. Someone using the package would add another dependency similar to:
<dependency>
<groupId>org.readium</groupId>
<artifactId>libepub3</artifactId>
<version>0.20.0</version>
<classifier>x86</classifier>
<type>so</type>
</dependency>
Does the x86
branch produce both an ARM and x86 library in the same build step?
To be specific:
https://github.com/readium/readium-sdk/pull/193/files#diff-fc48f08e2ee31a43a379d7e21209839aR38
It would just require another <artifact>
element to be added in there that had an x86
classifier and that pointed to the right library file.
@io7m
Does the x86 branch produce both an ARM and x86 library in the same build step?
I think so (need to check):
APP_ABI := armeabi-v7a x86
https://github.com/readium/readium-sdk/blob/719d5c504fb3c61fcfc216ba468c05b31fd718e5/Platform/Android/Application.mk#L1
Right!
I built it last month, and the answer is Yes
Cyril [signature3]
Cyril LABORDRIE Chef de projet Big Data, Technologies et Standards Project Manager Big data, Technologies and Standards Tel. +33 (0)1 82 73 13 44 Cel. +33 (0)7 86 36 99 22 [email protected]:[email protected]
Cap Digital, Business Cluster For Digital Content and Services 14 rue Alexandre Parodi 75010 Paris - France Web site: www.capdigital.comhttp://www.capdigital.com/
De : Daniel Weck [mailto:[email protected]] Envoyé : mardi 1 septembre 2015 17:16 À : readium/readium-sdk [email protected] Objet : Re: [readium-sdk] Maven packages (#193)
@io7mhttps://github.com/io7m
Does the x86 branch produce both an ARM and x86 library in the same build step? I think so (need to check): https://github.com/readium/readium-sdk/blob/719d5c504fb3c61fcfc216ba468c05b31fd718e5/Platform/Android/Application.mk#L1
— Reply to this email directly or view it on GitHubhttps://github.com/readium/readium-sdk/pull/193#issuecomment-136756697.
The latest changes added metadata in a similar manner to https://github.com/readium/readium-shared-js/pull/207.
Importantly, the extra changes also add support for deploying the x86
binary.
We'll need to figure out how this relates to the SDK as we move to Android Studio.
Android Studio will nag you to switch to Gradle, as that's the train wreck Google are currently recommending, but it should use the existing setup without modification.
Any packages produced with Maven and published to Maven Central are automatically compatible with Gradle.
@io7m there's a great AndroidStudio+Gradle setup with hybrid Java / C++ debugging, here:
https://github.com/readium/SDKLauncher-Android/pull/84
Have you tried it?
I haven't tried it.