Skip to content
This repository has been archived by the owner on Sep 28, 2018. It is now read-only.

Latest commit

 

History

History
123 lines (84 loc) · 3.96 KB

CONTRIBUTING.md

File metadata and controls

123 lines (84 loc) · 3.96 KB

Contributing

Building

Running ./gradlew can automatically install both the Gradle build system and the Android SDK.

If you already have the Android SDK installed, make sure to export the ANDROID_HOME environment variable, for example:

export ANDROID_HOME=/usr/local/Cellar/android-sdk/23.0.2

If you don't already have the Android SDK installed, it will be automatically installed to ~/.android-sdk.

Note: You'll need to make sure that the adb, android and emulator tools installed as part of the Android SDK are available in your $PATH before building.

Building the Library

You can build new .aar files as follows:

./gradlew clean ndk:build

Files are generated intondk/build/outputs/aar.

Running the examples app

You can build and install the example app to as follows:

./gradlew clean example:installDebug

This builds the latest version of the library and installs an app onto your device/emulator.

Releasing

If you are a project maintainer, you can build and release a new version of bugsnag-android-ndk as follows:

1. Ensure you have permission to make a release

This process is a little ridiculous...

  • Create a Sonatype JIRA account
  • Ask in the Bugsnag Sonatype JIRA ticket to become a contributor
  • Ask an existing contributor (likely Simon) to confirm in the ticket
  • Wait for Sonatype them to confirm the approval

2. Prepare for release

  • Test unhandled and handled exception reporting via the example application, ensuring both kinds of reports are sent.

  • Ensure that the native API headers (in src/main/assets/include) are in sync with the implementation/private headers.

  • Update the CHANGELOG and README.md with any new features

  • Update the version numbers in gradle.properties

  • Commit and tag the release

    make VERSION=1.x.x publish

3. Release to Maven Central

  • Create a file ~/.gradle/gradle.properties with the following contents:

    # Your credentials for https://oss.sonatype.org/
    # NOTE: An equals sign (`=`) in any of these fields will break the parser
    NEXUS_USERNAME=your-nexus-username
    NEXUS_PASSWORD=your-nexus-password
    
    # GPG key details
    signing.keyId=your-gpg-key-id # From gpg --list-keys
    signing.password=your-gpg-key-passphrase
    signing.secretKeyRingFile=/Users/{username}/.gnupg/secring.gpg
  • Build and upload the new version

    ./gradlew clean assemble -Preleasing=true && ./gradlew publish -Preleasing=true
  • "Promote" the release build on Maven Central

    • Go to the sonatype open source dashboard
    • Click the search box at the top right, and type “com.bugsnag”
    • Select the com.bugsnag staging repository
    • Click the “close” button in the toolbar, no message
    • Click the “refresh” button
    • Select the com.bugsnag closed repository
    • Click the “release” button in the toolbar

4. Upload the .aar and headers to GitHub

  • Create a "release" from your new tag on GitHub Releases
  • Upload the generated archive file from build/outputs/aar/bugsnag-android-ndk-release.aar on the "edit tag" page for this release tag

5. Update documentation

  • Update installation instructions in the quickstart guides on the website with any new content (in _android.slim)
  • Bump the version number in the installation instructions on docs.bugsnag.com/platforms/android, and add any new content