Skip to content
Jacksgong edited this page Nov 2, 2019 · 15 revisions

Welcome to the okdownload wiki!

In fact, OkDownload is FileDownloader2 which extends all preponderance from FileDownloader and beyond.

Import okdownload through gradle

If you import component library it would be enabled by default, such as you import okhttp with implementation "com.liulishuo.okdownload:okhttp:1.0.3" on the gradle file, then okdownload will find it and enable okhttp as default for okdownload.

OkDownload

// core
com.liulishuo.okdownload:okdownload:{latest_version}
// provide sqlite to store breakpoints
com.liulishuo.okdownload:sqlite:{latest_version}
// provide okhttp to connect to backend
// and then please import okhttp dependencies by yourself
com.liulishuo.okdownload:okhttp:{latest_version}
// provide interface to match filedownloader
com.liulishuo.okdownload:filedownloader:{latest_version}
// provide interface for kotlin extension
com.liulishuo.okdownload:ktx{latest_version}

Snapshots of the development version are available in Sonatype's snapshots repository, you can include on your gradle project through:

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
// core
com.liulishuo.okdownload:okdownload:1.0.7-SNAPSHOT
// provide sqlite to store breakpoints
com.liulishuo.okdownload:sqlite:1.0.7-SNAPSHOT
// provide okhttp to connect to backend
com.liulishuo.okdownload:okhttp:1.0.7-SNAPSHOT

Attension

If you are using com.liulishuo.okdownload:okhttp, please import okhttp by yourself, such as:

implementation 'com.squareup.okhttp3:okhttp:3.10.0'