yshrsmz / bucketeer-android-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Bucketeer Client-side SDK for Android

Setup

Install prerequisite tools.

  • Android Studio
  • Java

Then, you need to create local.properties.

# build
sdk.dir=<SDK_DIR_PATH> # e.g. /Users/<USER_NAME>/Library/Android/sdk

# test
api_key=<API_KEY>
api_url=<API_URL> # e.g. api-media.bucketeer.jp

# sample
sample.use_released_sdk=false
sample.sdk_version=<SDK_VERSION>

# publish (if needed)
# sdk.version=<SDK_VERSION>
# signing.keyId=<SIGNING_KEY_ID>
# signing.password=<SIGNING_PASSWORD>
# signing.secretKeyRingFile=<SIGNING_SECRET_KEY_RING_FILE>

Development

Development with Android Studio

Open Android Studio and import bucketeer-android-sdk.

Development with command line

project :bucketeer (SDK)

Displays the tasks runnable from project ':bucketeer'.

./gradlew :bucketeer:tasks

Runs lint on the Debug build.

./gradlew :bucketeer:lintDebug

Run unit tests for the debug build.

./gradlew :bucketeer:testDebugUnitTest

Deletes the build directory and assembles all Release builds. (Create ./bucketeer/build/outputs/aar/bucketeer-release.aar)

./gradlew clean :bucketeer:assembleRelease

Installs and runs the integration tests for debug on connected devices. Open Android Emulator, then run the command below.

./gradlew :bucketeer:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=jp.bucketeer.sdk.test.integration

Installs and runs the e2e tests for debug on connected devices. Open Android Emulator, then run the command below.

./gradlew :bucketeer:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=jp.bucketeer.sdk.test.e2e

Publishes SDK to Sonatype repository and releases to Maven Central. (Usually you don't need to publish manually because CI/CD workflow publishes automatically.)

./gradlew :bucketeer:publish --no-daemon --no-parallel -PmavenCentralUsername=$SONATYPE_USERNAME -PmavenCentralPassword=$SONATYPE_PASSWORD
./gradlew closeAndReleaseRepository

project :sample (Sample)

Displays the tasks runnable from project ':sample'.

./gradlew :sample:tasks

Deletes the build directory and assembles all Release builds. (Create ./sample/build/outputs/apk/sample-release.apk)

./gradlew clean :sample:assembleRelease

Tips

Use published SDK in Sample

If you want to use published SDK instead of local one, change local.properties like below,

(check SDK versions here)

# sample
sample.use_released_sdk=true
sample.sdk_version=X.Y.Z

then build and start the sample app.

Contributing

CONTRIBUTING.md

SDK User Docs

Samples

Bucketeer Samples

About

License:Apache License 2.0


Languages

Language:Kotlin 98.9%Language:Makefile 0.9%Language:Java 0.2%