Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisives committed Nov 8, 2023
1 parent 1bc5ca6 commit 012f2d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,11 @@ jobs:
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.GH_SSH_PRIVATE }}"
- name: create credentials.json file for the tests to read the keys
- name: create credentials.json files for the tests to read the keys
run: |
mkdir -p ~/.config/high-mobility/fleet-sdk/
# ' will not escape "" inside the yaml file
echo '${{ secrets.CREDENTIALS_JSON }}' > ~/.config/high-mobility/fleet-sdk/credentials.json
- name: create credentialsPrivateKey.json file for the tests to read the keys
run: |
mkdir -p ~/.config/high-mobility/fleet-sdk/
# ' will not escape "" inside the yaml file
echo '${{ secrets.CREDENTIALS_JSON_PRIVATE_KEY }}' > ~/.config/high-mobility/fleet-sdk/credentialsPrivateKey.json
- name: Update submodules
Expand Down
4 changes: 2 additions & 2 deletions hmkit-fleet/src/main/kotlin/HMKitConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HMKitConfiguration private constructor(builder: Builder) {
private set

/**
* Set the credentials to be used for the SDK. Choose from either [HMKitOAuthCredentials] or [HMKitPrivateKeyCredentials].
* Set the credentials to be used for the SDK. Choose from either [HMKitOAuthCredentials] or [HMKitPrivateKeyCredentials]. This is a mandatory field.
*/
fun credentials(credentials: HMKitCredentials) = apply { this.credentials = credentials }

Expand All @@ -26,7 +26,7 @@ class HMKitConfiguration private constructor(builder: Builder) {
fun environment(environment: HMKitFleet.Environment) = apply { this.environment = environment }

/**
* Set the OkHttpClient to be used for network requests.
* Optionally, set the OkHttpClient to be used for network requests.
*/
fun client(client: OkHttpClient) = apply { this.client = client }

Expand Down
9 changes: 5 additions & 4 deletions hmkit-fleet/src/main/kotlin/HMKitFleet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@ import java.util.concurrent.CompletableFuture

/**
* HMKitFleet is the access point for the Fleet SDK functionality. It is accessed by
* creating a new HMKitFleet object with a service account private key JSON string.
* creating a new HMKitFleet object with a HMKitConfiguration object.
*
* ```
* HMKitFleet fleet = new HMKitFleet(
* readStringContents(service-account-private-key-{id}.json),
* HMKitFleet.Environment.SANDBOX
* new HMKitConfiguration.Builder()
* .credentials(new HMKitOAuthCredentials("client_id", "client_secret"))
* .build()
* );
* ```
*/
class HMKitFleet @JvmOverloads constructor(
class HMKitFleet constructor(
/**
* Configure the HMKit. Use the [HMKitConfiguration.Builder] to create the object.
*/
Expand Down

0 comments on commit 012f2d8

Please sign in to comment.