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

Maven packages #193

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

Maven packages #193

wants to merge 6 commits into from

Conversation

io7m
Copy link

@io7m io7m commented Sep 1, 2015

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.

…s so that they can be referenced in any application that uses a build system compatible with Maven packages.
@danielweck
Copy link
Member

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)?

@danielweck
Copy link
Member

@io7m
Copy link
Author

io7m commented Sep 1, 2015

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?

@io7m
Copy link
Author

io7m commented Sep 1, 2015

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.

@danielweck
Copy link
Member

@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

APP_ABI := armeabi-v7a x86

@io7m
Copy link
Author

io7m commented Sep 1, 2015

Right!

@CLabordrieCapDigital
Copy link

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
cyril.labordrie@capdigital.commailto:cyril.labordrie@capdigital.com

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:notifications@github.com]
Envoyé : mardi 1 septembre 2015 17:16
À : readium/readium-sdk readium-sdk@noreply.github.com
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):

APP_ABI := armeabi-v7a x86


Reply to this email directly or view it on GitHubhttps://github.com//pull/193#issuecomment-136756697.

io7m added a commit to NYPL-Simplified/readium-sdk that referenced this pull request Sep 21, 2015
These are functionally equivalent to the POM files added in the
PR readium#193, however these
use an org.nypl.readium group ID to prevent accidental use of the
packages.
This adds all required metadata for OSSRH, adds optional
PGP signing, and adds the x86 library that appeared some
time after the original project files were written.
@io7m
Copy link
Author

io7m commented Sep 24, 2015

The latest changes added metadata in a similar manner to readium/readium-shared-js#207.

Importantly, the extra changes also add support for deploying the x86 binary.

@rkwright
Copy link
Member

We'll need to figure out how this relates to the SDK as we move to Android Studio.

@io7m
Copy link
Author

io7m commented Feb 18, 2016

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.

@danielweck
Copy link
Member

@io7m there's a great AndroidStudio+Gradle setup with hybrid Java / C++ debugging, here:

readium/SDKLauncher-Android#84

Have you tried it?

@io7m
Copy link
Author

io7m commented Feb 18, 2016

I haven't tried it.

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.

None yet

4 participants