-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade to Onfleet SDK 0.12.0, modernize toolchain, and add CI #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8cd3cca
Upgrade to Onfleet SDK 0.12.0 and modernize build toolchain
polivmi1 9498ac6
ci: add build workflow, Dependabot, self-contained config, README
polivmi1 4181973
update changelog
polivmi1 9e4b8d2
Comment out mavenLocal() now that SDK 0.12.0 is on Maven Central
polivmi1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: gradle | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 10 | ||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: '21' | ||
|
|
||
| - name: Set up Gradle | ||
| uses: gradle/actions/setup-gradle@v4 | ||
|
|
||
| - name: Provide onfleet.properties (placeholder is fine for a build) | ||
| run: | | ||
| if [ ! -f app/src/main/assets/onfleet.properties ]; then | ||
| cp app/src/main/assets/onfleet.properties.example \ | ||
| app/src/main/assets/onfleet.properties | ||
| fi | ||
|
|
||
| - name: Assemble debug | ||
| run: ./gradlew assembleDebug --no-daemon --stacktrace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,25 @@ | ||
| # Android Onfleet SDK example project | ||
|
|
||
| - in the assets folder onfleet.properties file enter an application name and SDK key | ||
| - add google-services.json that you registered with Onfleet for push messages | ||
| A minimal example app showing how to integrate the Onfleet Driver SDK. | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. Copy the config template and fill in the values Onfleet gave you: | ||
| ```bash | ||
| cp app/src/main/assets/onfleet.properties.example app/src/main/assets/onfleet.properties | ||
| ``` | ||
| - `applicationName` — your application name | ||
| - `sdkApplicationId` — your Onfleet SDK key | ||
|
|
||
| 2. (Push notifications) Replace the placeholder `app/google-services.json` with the | ||
| `google-services.json` for the Firebase project you registered with Onfleet. The | ||
| committed file is a non-functional placeholder so the project builds out of the box; | ||
| push delivery requires your own Firebase config. | ||
|
|
||
| ## Build | ||
|
|
||
| ```bash | ||
| ./gradlew assembleDebug | ||
| ``` | ||
|
|
||
| CI builds every pull request and every push to `master`. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,66 +1,55 @@ | ||
| plugins { | ||
| id("com.android.application") | ||
| id("kotlin-android") | ||
| id("kotlin-parcelize") | ||
| id("org.jetbrains.kotlin.plugin.parcelize") | ||
| id("com.google.gms.google-services") | ||
| id("org.jetbrains.kotlin.plugin.compose") | ||
| } | ||
|
|
||
| android { | ||
| compileSdk = 34 | ||
| buildToolsVersion = "34.0.0" | ||
| compileSdk = 36 | ||
| buildToolsVersion = "36.0.0" | ||
|
|
||
| defaultConfig { | ||
| applicationId = "com.onfleet.sdk.onfleetclientexample" | ||
| minSdk = 24 | ||
| targetSdk = 34 | ||
| minSdk = 26 | ||
| targetSdk = 36 | ||
| versionCode = 1 | ||
| versionName = "0.11.1" | ||
| multiDexEnabled = true | ||
| versionName = "0.12.0" | ||
| } | ||
| buildTypes { | ||
| release { | ||
| isMinifyEnabled = false | ||
| proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") | ||
| proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
| } | ||
| debug { | ||
| } | ||
| } | ||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_11 | ||
| targetCompatibility = JavaVersion.VERSION_11 | ||
| } | ||
| kotlinOptions { | ||
| jvmTarget = JavaVersion.VERSION_11.toString() | ||
| freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn" | ||
| sourceCompatibility = JavaVersion.VERSION_21 | ||
| targetCompatibility = JavaVersion.VERSION_21 | ||
| } | ||
|
|
||
| buildFeatures { | ||
| compose = true | ||
| } | ||
| composeOptions { | ||
| kotlinCompilerExtensionVersion = "1.4.7" | ||
| } | ||
| namespace = "com.onfleet.sdk.onfleetclientexample" | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation("com.onfleet:driver:0.11.1") | ||
| implementation("androidx.appcompat:appcompat:1.6.1") | ||
| implementation("androidx.core:core-ktx:1.10.1") | ||
| implementation("org.jetbrains.kotlin:kotlin-stdlib:1.8.22") | ||
| implementation("androidx.exifinterface:exifinterface:1.3.6") | ||
| implementation("com.google.firebase:firebase-core:21.1.1") | ||
| implementation("com.google.firebase:firebase-messaging:23.1.2") | ||
| implementation("androidx.multidex:multidex:2.0.1") | ||
| implementation("com.onfleet:driver:0.12.0") | ||
| implementation("androidx.appcompat:appcompat:1.7.1") | ||
| implementation("org.jetbrains.kotlin:kotlin-stdlib:2.1.0") | ||
| implementation("androidx.exifinterface:exifinterface:1.4.2") | ||
| implementation(platform("com.google.firebase:firebase-bom:34.11.0")) | ||
| implementation("com.google.firebase:firebase-messaging") | ||
| implementation("com.jakewharton.timber:timber:5.0.1") | ||
| implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1") | ||
| implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1") | ||
| implementation("androidx.compose.ui:ui:1.5.0-beta02") | ||
| implementation("androidx.compose.ui:ui-tooling:1.5.0-beta02") | ||
| implementation("androidx.compose.foundation:foundation:1.5.0-beta02") | ||
| implementation("androidx.compose.compiler:compiler:1.4.7") | ||
| implementation("androidx.activity:activity-compose:1.7.2") | ||
| implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1") | ||
| implementation("androidx.compose.material3:material3:1.2.0-alpha02") | ||
| implementation("com.google.accompanist:accompanist-permissions:0.31.3-beta") | ||
| implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2") | ||
| implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2") | ||
| implementation("androidx.compose.ui:ui:1.10.5") | ||
| implementation("androidx.compose.ui:ui-tooling:1.10.5") | ||
|
polivmi1 marked this conversation as resolved.
|
||
| implementation("androidx.compose.foundation:foundation:1.10.5") | ||
| implementation("androidx.activity:activity-compose:1.13.0") | ||
| implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.10.0") | ||
| implementation("androidx.compose.material3:material3:1.4.0") | ||
| implementation("com.google.accompanist:accompanist-permissions:0.37.3") | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "project_info": { | ||
| "project_number": "000000000000", | ||
| "project_id": "onfleet-sdk-example-placeholder", | ||
| "storage_bucket": "onfleet-sdk-example-placeholder.appspot.com" | ||
| }, | ||
| "client": [ | ||
| { | ||
| "client_info": { | ||
| "mobilesdk_app_id": "1:000000000000:android:0000000000000000000000", | ||
| "android_client_info": { | ||
| "package_name": "com.onfleet.sdk.onfleetclientexample" | ||
| } | ||
| }, | ||
| "oauth_client": [], | ||
| "api_key": [ | ||
| { "current_key": "AIzaSyPLACEHOLDERPLACEHOLDERPLACEHOLDER00000" } | ||
| ], | ||
| "services": { | ||
| "appinvite_service": { "other_platform_oauth_client": [] } | ||
| } | ||
| } | ||
| ], | ||
| "configuration_version": "1" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Copy this file to onfleet.properties and fill in the values. | ||
| # cp app/src/main/assets/onfleet.properties.example app/src/main/assets/onfleet.properties | ||
| # Both values are provided by Onfleet when you register your app. | ||
| applicationName= | ||
| sdkApplicationId= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.