Skip to content

Commit 8cfa37d

Browse files
author
Mahavir Jain
authored
Merge pull request #297 from codetoart/master
r2_streamer_kotlin integration
2 parents f47f87a + 8efa133 commit 8cfa37d

File tree

123 files changed

+2882
-17938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+2882
-17938
lines changed

.gitignore

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild
10+
111
# Custom
212
_site
313

@@ -37,4 +47,7 @@ out
3747
# Maven
3848
target
3949
release.properties
40-
pom.xml.*
50+
pom.xml.*
51+
52+
# Readium DRM LCP
53+
liblcp.aar

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,30 @@ FolioReader-Android is an ePub reader written in Java.
3838

3939
### Gradle
4040

41-
Add following dependency to your app module `build.gradle` file:
41+
Add following dependency to your root project `build.gradle` file:
4242

4343
```groovy
44-
repositories {
45-
maven {
46-
url 'http://dl.bintray.com/mobisystech/maven'
44+
allprojects {
45+
repositories {
46+
...
47+
maven { url "https://dl.bintray.com/mobisystech/maven" }
48+
maven { url "https://jitpack.io" }
49+
...
4750
}
4851
}
52+
```
53+
54+
Add following dependency to your app module `build.gradle` file:
4955

56+
```groovy
5057
dependencies {
51-
implementation 'com.folioreader:folioreader:0.4.4'
58+
...
59+
implementation "com.folioreader:folioreader:0.5.1"
60+
...
5261
}
5362
```
5463

64+
5565
### AndroidManifest
5666

5767
Starting with Android 9.0 (API level 28), cleartext support is disabled by default.

build.gradle

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.2.61'
4+
ext.KOTLIN_VERSION = '1.2.71'
55

66
repositories {
77
google()
@@ -24,22 +24,28 @@ allprojects {
2424
repositories {
2525
google()
2626
jcenter()
27+
maven { url "https://dl.bintray.com/mobisystech/maven" }
28+
maven { url "https://jitpack.io" }
29+
mavenLocal()
2730
}
2831
}
2932

3033
ext {
31-
LIBRARY_VERSION = '0.4.4'
32-
R2_STREAMER_VERSION = '0.1.8'
34+
FOLIOREADER_SDK_VERSION = '0.5.1'
35+
R2_STREAMER_KOTLIN_VERSION = '1.0.3-5'
36+
R2_SHARED_KOTLIN_VERSION = '1.0.3-2'
3337

3438
VERSION_NAME = "1.0"
3539
VERSION_CODE = 1
3640

37-
ANDROID_MIN_SDK = 15
41+
ANDROID_MIN_SDK = 19
3842
ANDROID_COMPILE_SDK_VERSION = 28
3943
ANDROID_TARGET_SDK_VERSION = 28
40-
ANDROID_LIB_VERSION = '28.0.0-rc01'
44+
ANDROID_LIB_VERSION = '28.0.0'
4145

4246
CONSTRAINT_LAYOUT_VERSION = "1.1.3"
47+
48+
JACKSON_VERSION = '2.8.6'
4349
}
4450

4551
task clean(type: Delete) {

config/quality/checkstyle/checkstyle-config.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,6 @@
110110

111111
<!-- Naming -->
112112

113-
<module name="PackageName">
114-
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
115-
<message key="name.invalidPattern"
116-
value="Package name ''{0}'' must match pattern ''{1}''."/>
117-
</module>
118-
119113
<module name="MethodName">
120114
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
121115
<message key="name.invalidPattern"
@@ -127,15 +121,6 @@
127121
value="Type name ''{0}'' must match pattern ''{1}''."/>
128122
</module>
129123

130-
<module name="MemberName">
131-
<property name="applyToPublic" value="false" />
132-
<property name="applyToPackage" value="false" />
133-
<property name="applyToProtected" value="false" />
134-
<property name="format" value="^m[A-Z]+[a-z0-9][a-zA-Z0-9]*$"/>
135-
<message key="name.invalidPattern"
136-
value="Member name ''{0}'' must match pattern ''{1}''."/>
137-
</module>
138-
139124
<module name="ParameterName">
140125
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
141126
<message key="name.invalidPattern"

folioreader/AndroidManifest.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
package="com.folioreader">
45

56
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
67
<uses-permission android:name="android.permission.INTERNET" />
78

8-
<application>
9+
<uses-sdk tools:overrideLibrary="org.readium.r2.streamer, org.readium.r2.shared" />
10+
11+
<application
12+
android:allowBackup="true"
13+
tools:replace="android:allowBackup">
914

1015
<provider
1116
android:name=".AppContext"
@@ -15,7 +20,7 @@
1520
<activity
1621
android:name=".ui.folio.activity.FolioActivity"
1722
android:label="@string/app_name"
18-
android:theme="@style/FolioAppDayTheme" />
23+
android:theme="@style/FolioActivityDayTheme" />
1924

2025
<activity
2126
android:name=".ui.folio.activity.ContentHighlightActivity"

folioreader/build.gradle

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ext {
1717
siteUrl = 'https://github.com/FolioReader/FolioReader-Android'
1818
gitUrl = 'https://github.com/FolioReader/FolioReader-Android.git'
1919

20-
libraryVersion = LIBRARY_VERSION
20+
libraryVersion = FOLIOREADER_SDK_VERSION
2121

2222
developerId = 'mobisystech'
2323
developerName = 'Folio Reader'
@@ -37,6 +37,7 @@ android {
3737
targetSdkVersion ANDROID_TARGET_SDK_VERSION
3838
versionCode VERSION_CODE
3939
versionName VERSION_NAME
40+
vectorDrawables.useSupportLibrary = true
4041
}
4142

4243
sourceSets {
@@ -72,40 +73,43 @@ android {
7273

7374
lintOptions {
7475
abortOnError false
76+
lintConfig file("lint.xml")
7577
}
7678

7779
checkstyle {
7880
ignoreFailures = true
7981
}
8082
}
8183

82-
repositories {
83-
maven {
84-
url "http://dl.bintray.com/mobisystech/maven"
85-
}
86-
}
87-
8884
apply from: '../folioreader/bintray/installv1.gradle'
8985
dependencies {
9086
implementation fileTree(include: ['*.jar'], dir: 'libs')
91-
implementation project(':webViewMarker')
9287

9388
implementation "com.android.support.constraint:constraint-layout:$CONSTRAINT_LAYOUT_VERSION"
9489
implementation "com.android.support:appcompat-v7:$ANDROID_LIB_VERSION"
9590
implementation "com.android.support:recyclerview-v7:$ANDROID_LIB_VERSION"
9691
implementation "com.android.support:support-v4:$ANDROID_LIB_VERSION"
9792
implementation "com.android.support:design:$ANDROID_LIB_VERSION"
9893

94+
implementation 'org.slf4j:slf4j-android:1.7.25'
9995
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
10096

10197
//Kotlin
10298
implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
10399

104-
// r2-streamer
105-
api "org.readium:r2-fetcher:$R2_STREAMER_VERSION"
106-
api "org.readium:r2-parser:$R2_STREAMER_VERSION"
107-
api "org.readium:r2-server:$R2_STREAMER_VERSION"
108-
109100
implementation 'org.greenrobot:eventbus:3.1.1'
101+
102+
implementation "com.fasterxml.jackson.core:jackson-core:$JACKSON_VERSION"
103+
implementation "com.fasterxml.jackson.core:jackson-annotations:$JACKSON_VERSION"
104+
implementation "com.fasterxml.jackson.core:jackson-databind:$JACKSON_VERSION"
105+
106+
// R2 modules
107+
implementation "com.github.codetoart:r2-shared-kotlin:$R2_SHARED_KOTLIN_VERSION"
108+
implementation("com.github.codetoart:r2-streamer-kotlin:$R2_STREAMER_KOTLIN_VERSION") {
109+
exclude group: "org.slf4j", module: "slf4j-api"
110+
}
111+
112+
// To use only ReflectionUtils in Spring framework
113+
implementation 'org.springframework:spring-core:4.3.19.RELEASE'
110114
}
111115
apply from: '../folioreader/bintray/bintrayv1.gradle'
-216 KB
Binary file not shown.
-28.1 KB
Binary file not shown.

folioreader/lint.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<lint>
3+
<!-- Disable the given check in this project -->
4+
<issue id="LogNotTimber" severity="ignore" />
5+
</lint>

folioreader/res/color/content_highlight_text_selector_night_mode.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)