Add the dependency from Maven Central to your app module's (not top-level) build.gradle.kts
file:
dependencies {
implementation("dev.hotwire:turbo:<latest-version>")
}
See the latest version available on Maven Central.
Android SDK 26 (or greater) is required as the minSdk
in your app module's build.gradle.kts
file:
compileSdk = 34
defaultConfig {
minSdk = 26
targetSdk = 34
// ...
}
In order for a WebView to access the Internet and load web pages, your app must have the INTERNET
permission. Make sure you include this permission in your app's AndroidManifest.xml
file:
<uses-permission android:name="android.permission.INTERNET"/>
Pre-release builds will be published to GitHub Packages.
If you'd like to use a pre-release version, you'll need to create a Personal Access Token in your GitHub account and give it the read:packages
permission.
Copy your access token to your .bash_profile
(or another accessible place that's outside of source control):
export GITHUB_USER='<your username>'
export GITHUB_ACCESS_TOKEN='<your personal access token>'
Add the GitHub Packages maven repository and the dependency to your app module's build.gradle.kts
file:
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/hotwired/turbo-android")
credentials {
username = System.getenv('GITHUB_USER')
password = System.getenv('GITHUB_ACCESS_TOKEN')
}
}
}
dependencies {
implementation("dev.hotwire:turbo:<latest-version>")
}
See the latest version available on GitHub Packages.