Add the dependency from Maven Central to your app module's (not top-level) build.gradle
file:
repositories {
mavenCentral()
}
dependencies {
implementation 'dev.hotwire:turbo:<latest-version>'
}
See the latest version available on Maven Central.
Note: As of May 1, 2021, artifacts will no longer be released to JCenter, since it's shutting down.
Android SDK 24 (or greater) is required as the minSdkVersion
in your app module's build.gradle
file:
defaultConfig {
minSdkVersion 24
// ...
}
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
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.