Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@gpolak
Copy link
Contributor

@gpolak gpolak commented Sep 18, 2025

  • builds as an Android module
    • generates the aar, sources, and pom
    • publishes to com/uber/h3-android
  • currently only supports publishing to mavenLocal

@coveralls
Copy link

Pull Request Test Coverage Report for Build #554

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.437%

Totals Coverage Status
Change from base Build #551: 0.0%
Covered Lines: 523
Relevant Lines: 546

💛 - Coveralls

@isaacbrodsky
Copy link
Collaborator

What commands did you use to build the aar? From my local testing you need to build the regular jar first, in order for the native artifacts to get generated?

@isaacbrodsky
Copy link
Collaborator

Here are the commands I used to test the build:

./gradlew clean test -Ph3DockcrossOnly="android-arm android-arm64"
./gradlew publishAndroidLocal -Ph3DockcrossOnly="android-arm android-arm64"

The AAR is then in my local repo:

$ unzip -l ~/.m2/repository/com/uber/h3-android/4.3.2-SNAPSHOT/h3-android-4.3.2-SNAPSHOT.aar
Archive:  /Users/isaac/.m2/repository/com/uber/h3-android/4.3.2-SNAPSHOT/h3-android-4.3.2-SNAPSHOT.aar
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  09-18-2025 17:32   jni/
        0  09-18-2025 17:32   jni/armeabi-v7a/
   165684  09-18-2025 17:31   jni/armeabi-v7a/libh3-java.so
        0  09-18-2025 17:32   jni/arm64-v8a/
   165216  09-18-2025 17:31   jni/arm64-v8a/libh3-java.so
   156242  09-18-2025 17:32   classes.jar
      224  09-18-2025 17:32   AndroidManifest.xml
---------                     -------
   487366                     7 files

I was then able to use the local artifact in my test Android app, although I did find that externalNativeBuild was still needed in my app in some form or else the test app crashed on startup.

@isaacbrodsky
Copy link
Collaborator

isaacbrodsky commented Sep 19, 2025

For publishing, I assume we'd publish to com.uber:h3-android at the same time as the jar artifact, and use the same credentials? I would be fine with merging a local-only publishing script in first and then adapting the publish-to-central script, as that could require its own fine tuning. If that sounds good I can merge this in now.

Copy link
Collaborator

@isaacbrodsky isaacbrodsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add some build instructions to README or to the dev docs


## Unreleased Changes
### Changed
- Added option to build and publish as an Android module into h3-android
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Added option to build and publish as an Android module into h3-android
- Added option to build and publish as an Android module into h3-android. (#184)

Comment on lines +175 to +179
manifestFile.text = '''<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.uber.h3core">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="34" />
</manifest>'''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep this as some kind of resource file in the Git tree but that's really a nit considering it's small

@gpolak
Copy link
Contributor Author

gpolak commented Sep 24, 2025

For publishing, I assume we'd publish to com.uber:h3-android at the same time as the jar artifact, and use the same credentials? I would be fine with merging a local-only publishing script in first and then adapting the publish-to-central script, as that could require its own fine tuning. If that sounds good I can merge this in now.

Hi @isaacbrodsky , yeah, that was my thought process: land this with local-only, then add maven publishing after.

Assuming that this will get published to com.uber:h3-android.

@isaacbrodsky isaacbrodsky merged commit 853ac3a into uber:master Sep 25, 2025
69 checks passed
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.

3 participants