Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
2.2.1 (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu committed Sep 23, 2021
1 parent 29ec3c4 commit 9083c31
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 27 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.5.21'
ext.kotlin_version = '1.5.31'

repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.android.tools.build:gradle:7.0.2'

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

Expand Down
26 changes: 13 additions & 13 deletions r2-testapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ group = 'com.github.readium'

int major = 2
int minor = 2
int patch = 0
int build = 28
int patch = 1
int build = 29
String type = ""

def version = "$major.$minor.$patch"
Expand Down Expand Up @@ -84,7 +84,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

final READIUM_VERSION = 'develop-SNAPSHOT'
final READIUM_VERSION = '2.1.0'
if (findProject(':r2-shared')) {
implementation project(':r2-shared')
} else {
Expand All @@ -111,19 +111,19 @@ dependencies {
implementation "com.github.readium:r2-lcp-kotlin:$READIUM_VERSION"
}

implementation 'androidx.core:core-ktx:1.5.0'
implementation "androidx.activity:activity-ktx:1.2.3"
implementation "androidx.appcompat:appcompat:1.3.0"
implementation 'androidx.core:core-ktx:1.6.0'
implementation "androidx.activity:activity-ktx:1.3.1"
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "androidx.browser:browser:1.3.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation "androidx.fragment:fragment-ktx:1.3.5"
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
implementation "androidx.fragment:fragment-ktx:1.3.6"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
implementation "androidx.paging:paging-runtime-ktx:3.0.0"
implementation "androidx.paging:paging-runtime-ktx:3.0.1"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation "androidx.webkit:webkit:1.4.0"
Expand All @@ -135,13 +135,13 @@ dependencies {
implementation ("com.github.edrlab.nanohttpd:nanohttpd-nanolets:master-SNAPSHOT") {
exclude group: 'org.parboiled'
}
implementation "com.google.android.material:material:1.3.0"
implementation "com.google.android.material:material:1.4.0"
implementation "com.jakewharton.timber:timber:4.7.1"
// AM NOTE: needs to stay this version for now (June 24,2020)
//noinspection GradleDependency
implementation "com.squareup.picasso:picasso:2.5.2"
implementation "joda-time:joda-time:2.10.10"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-native-mt"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0"
// AM NOTE: needs to stay this version for now (June 24,2020)
//noinspection GradleDependency
implementation 'org.jsoup:jsoup:1.13.1'
Expand All @@ -159,7 +159,7 @@ dependencies {
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation "junit:junit:4.13.2"

androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
androidTestImplementation "androidx.test:runner:1.3.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
androidTestImplementation "androidx.test:runner:1.4.0"

}
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,10 @@ class CatalogViewModel(application: Application) : AndroidViewModel(application)
showProgressBar.set(false)
}

private fun getDownloadURL(publication: Publication): URL? {
var url: URL? = null
val links = publication.links
for (link in links) {
val href = link.href
if (href.contains(Publication.EXTENSION.EPUB.value) || href.contains(Publication.EXTENSION.LCPL.value)) {
url = URL(href)
break
}
}
return url
}
private fun getDownloadURL(publication: Publication): URL? =
publication.links
.firstOrNull { it.mediaType.isPublication }
?.let { URL(it.href) }

private suspend fun addPublicationToDatabase(
href: String,
Expand Down

0 comments on commit 9083c31

Please sign in to comment.