Skip to content

Commit f7c8e35

Browse files
authored
2.1.0 (#118)
1 parent b9f7866 commit f7c8e35

File tree

7 files changed

+18
-9
lines changed

7 files changed

+18
-9
lines changed

readium/lcp/CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ All notable changes to this project will be documented in this file.
44

55
**Warning:** Features marked as *alpha* may change or be removed in a future release without notice. Use with caution.
66

7-
## [Unreleased]
7+
<!--## [Unreleased]-->
8+
9+
## [2.1.0]
810

911
### Changed
1012

11-
* Upgraded to Kotlin 1.5.21 and Gradle 7.1.1.
13+
* Upgraded to Kotlin 1.5.31 and Gradle 7.1.1.
1214
* Migrated to Jetpack Room for the SQLite database storing rights and passphrases (contributed by [@stevenzeck](https://github.com/readium/r2-lcp-kotlin/pull/116)).
1315
* Note that the internal SQL schema changed. You will need to update your app if you were querying the database manually.
1416

@@ -105,4 +107,5 @@ All notable changes to this project will be documented in this file.
105107
[2.0.0-beta.1]: https://github.com/readium/r2-lcp-kotlin/compare/2.0.0-alpha.2...2.0.0-beta.1
106108
[2.0.0-beta.2]: https://github.com/readium/r2-lcp-kotlin/compare/2.0.0-beta.1...2.0.0-beta.2
107109
[2.0.0]: https://github.com/readium/r2-lcp-kotlin/compare/2.0.0-beta.2...2.0.0
110+
[2.1.0]: https://github.com/readium/r2-lcp-kotlin/compare/2.0.0...2.1.0
108111

readium/lcp/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.5.21'
4+
ext.kotlin_version = '1.5.31'
55

66
repositories {
77
google()
88
mavenCentral()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.0.0'
11+
classpath 'com.android.tools.build:gradle:7.0.2'
1212

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

readium/lcp/r2-lcp/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ group='com.github.readium'
1616

1717
android {
1818

19-
compileSdkVersion 30
19+
compileSdkVersion 31
2020
defaultConfig {
2121
minSdkVersion 21
22-
targetSdkVersion 30
22+
targetSdkVersion 31
2323
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2424
}
2525
compileOptions {
@@ -56,7 +56,7 @@ dependencies {
5656
if (findProject(':r2-shared')) {
5757
implementation project(':r2-shared')
5858
} else {
59-
implementation "com.github.readium:r2-shared-kotlin:develop-SNAPSHOT"
59+
implementation "com.github.readium:r2-shared-kotlin:2.1.0"
6060
}
6161

6262

readium/lcp/r2-lcp/src/main/java/org/readium/r2/lcp/license/License.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ import org.readium.r2.shared.util.mediatype.MediaType
3030
import timber.log.Timber
3131
import java.net.HttpURLConnection
3232
import java.util.*
33+
import kotlin.time.ExperimentalTime
3334

35+
@OptIn(ExperimentalTime::class)
3436
internal class License(
3537
private var documents: ValidatedDocuments,
3638
private val validation: LicenseValidation,

readium/lcp/r2-lcp/src/main/java/org/readium/r2/lcp/service/CRLService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ import org.readium.r2.lcp.LcpException
1919
import org.readium.r2.shared.util.getOrElse
2020
import timber.log.Timber
2121
import java.util.*
22+
import kotlin.time.ExperimentalTime
2223

24+
@OptIn(ExperimentalTime::class)
2325
internal class CRLService(val network: NetworkService, val context: Context) {
2426

2527
private val preferences: SharedPreferences = context.getSharedPreferences("org.readium.r2.lcp", Context.MODE_PRIVATE)

readium/lcp/r2-lcp/src/main/java/org/readium/r2/lcp/service/DeviceService.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ import org.readium.r2.lcp.license.model.components.Link
1717
import timber.log.Timber
1818
import java.io.Serializable
1919
import java.util.*
20+
import kotlin.time.ExperimentalTime
2021

22+
@OptIn(ExperimentalTime::class)
2123
internal class DeviceService(private val repository: DeviceRepository, private val network: NetworkService, val context: Context):Serializable {
2224

23-
val preferences: SharedPreferences = context.getSharedPreferences("org.readium.r2.settings", Context.MODE_PRIVATE)
25+
private val preferences: SharedPreferences = context.getSharedPreferences("org.readium.r2.settings", Context.MODE_PRIVATE)
2426

2527
val id: String
2628
get() {

readium/lcp/r2-lcp/src/main/java/org/readium/r2/lcp/service/NetworkService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ internal typealias URLParameters = Map<String, String?>
3131

3232
internal class NetworkException(val status: Int?, cause: Throwable? = null) : Exception("Network failure with status $status", cause)
3333

34+
@OptIn(ExperimentalTime::class)
3435
internal class NetworkService {
3536
enum class Method(val rawValue: String) {
3637
GET("GET"), POST("POST"), PUT("PUT");
@@ -40,7 +41,6 @@ internal class NetworkService {
4041
}
4142
}
4243

43-
@OptIn(ExperimentalTime::class)
4444
suspend fun fetch(url: String, method: Method = Method.GET, parameters: URLParameters = emptyMap(), timeout: Duration? = null): Try<ByteArray, NetworkException> =
4545
withContext(Dispatchers.IO) {
4646
try {

0 commit comments

Comments
 (0)