Skip to content

Commit

Permalink
Update GettingStarted.md for Kotlin
Browse files Browse the repository at this point in the history
Add specific instructions for build.gradle.kts
  • Loading branch information
philburk authored May 1, 2024
1 parent b8f12a8 commit 573bc0b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Adding Oboe to your project

Oboe is a C++ library. So your Android Studio project will need to [support native C++ code](https://developer.android.com/studio/projects/add-native-code).

There are two ways use Oboe in your Android Studio project:

1) **Use the Oboe pre-built library binaries and headers**. Use this approach if you just want to use a stable version of the Oboe library in your project.
Expand All @@ -17,13 +20,21 @@ Add the oboe dependency to your app's `build.gradle` file. Replace "X.X.X" with
implementation 'com.google.oboe:oboe:X.X.X'
}

For `build.gradle.kts` add parentheses:

implementation("com.google.oboe:oboe:X.X.X")

Also enable prefab by adding:

android {
buildFeatures {
prefab true
}
}

For `build.gradle.kts` add an equal sign:

prefab = true

Include and link to oboe by updating your `CMakeLists.txt`:

Expand Down Expand Up @@ -51,10 +62,14 @@ Configure your app to use the shared STL by updating your `app/build.gradle`:
cmake {
arguments "-DANDROID_STL=c++_shared"
}
}
}
}
}

For `app/build.gradle.kts` add parentheses:

arguments("-DANDROID_STL=c++_shared")

## Option 2) Building from source

### 1. Clone the github repository
Expand Down

0 comments on commit 573bc0b

Please sign in to comment.