Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d84cb4d

Browse files
committed
Update Gradle plugins
Update compile SDK and support libs to 26 Set minimum SDK to 14 Update version and README
1 parent 408e6a2 commit d84cb4d

File tree

5 files changed

+34
-42
lines changed

5 files changed

+34
-42
lines changed

README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,14 @@ Library for displaying PDF documents on Android, with `animations`, `gestures`,
1010
It is based on [PdfiumAndroid](https://github.com/barteksc/PdfiumAndroid) for decoding PDF files. Works on API 11 (Android 3.0) and higher.
1111
Licensed under Apache License 2.0.
1212

13-
## What's new in 3.0.0-beta.1?
14-
* Add support for documents with different page sizes
15-
* Add support for links
16-
* Add support for defining page fit policy (fit width, height or both)
17-
* Update sample.pdf to contain different page sizes
18-
19-
3.0.0-beta.2 fixes rendering with maximum zoom, improves fit policies and updates PdfiumAndroid to 1.8.1
20-
21-
3.0.0-beta.3 fixes bug preventing `OnErrorListener` from being called
22-
23-
3.0.0-beta.4 fixes not loaded pages when using animated `PDFView#jumpTo()` and NPE in `canScrollVertically()` and `canScrollHorizontally()`
24-
25-
3.0.0-beta.5 fixes:
26-
* Issue with `Configurator#pages()` from #486
27-
* `IllegalStateException` from #464
28-
* Not detecting links reported in #447
13+
## What's new in 3.1.0-beta.1?
14+
* Merge pull request #557 for snapping pages (scrolling page by page)
15+
* merge pull request #618 for night mode
16+
* Merge pull request #566 for `OnLongTapListener`
17+
* Update PdfiumAndroid to 1.9.0, which uses `c++_shared` instead of `gnustl_static`
18+
* Update Gradle Plugin
19+
* Update compile SDK and support library to 26
20+
* Change minimum SDK to 14
2921

3022
## Changes in 3.0 API
3123
* Replaced `Contants.PRELOAD_COUNT` with `PRELOAD_OFFSET`
@@ -38,7 +30,7 @@ Licensed under Apache License 2.0.
3830

3931
Add to _build.gradle_:
4032

41-
`compile 'com.github.barteksc:android-pdf-viewer:3.0.0-beta.5'`
33+
`compile 'com.github.barteksc:android-pdf-viewer:3.1.0-beta.1'`
4234

4335
or if you want to use more stable version:
4436

@@ -94,6 +86,7 @@ pdfView.fromAsset(String)
9486
.onRender(onRenderListener) // called after document is rendered for the first time
9587
// called on single tap, return true if handled, false to toggle scroll handle visibility
9688
.onTap(onTapListener)
89+
.onLongPress(onLongPressListener)
9790
.enableAnnotationRendering(false) // render annotations (such as comments, colors or forms)
9891
.password(null)
9992
.scrollHandle(null)
@@ -105,6 +98,7 @@ pdfView.fromAsset(String)
10598
.pageFitPolicy(FitPolicy.WIDTH)
10699
.pageSnap(true) // snap pages to screen boundaries
107100
.pageFling(false) // make a fling change only a single page like ViewPager
101+
.nightMode(false) // toggle night mode
108102
.load();
109103
```
110104

android-pdf-viewer/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ext {
1313
siteUrl = 'https://github.com/barteksc/AndroidPdfViewer'
1414
gitUrl = 'https://github.com/barteksc/AndroidPdfViewer.git'
1515

16-
libraryVersion = '3.0.0-beta.5'
16+
libraryVersion = '3.1.0-beta.1'
1717

1818
developerId = 'barteksc'
1919
developerName = 'Bartosz Schiller'
@@ -25,20 +25,20 @@ ext {
2525
}
2626

2727
android {
28-
compileSdkVersion 25
29-
buildToolsVersion '25.0.3'
28+
compileSdkVersion 26
3029

3130
defaultConfig {
32-
minSdkVersion 11
33-
targetSdkVersion 25
31+
minSdkVersion 14
32+
targetSdkVersion 26
3433
versionCode 1
35-
versionName "3.0.0-beta.5"
34+
versionName "3.1.0-beta.1"
3635
}
3736

3837
}
3938

4039
dependencies {
41-
compile 'com.github.barteksc:pdfium-android:1.8.2'
40+
implementation 'com.android.support:support-compat:26.1.0'
41+
api 'com.github.barteksc:pdfium-android:1.9.0'
4242
}
4343

4444
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'

build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11

22
buildscript {
33
repositories {
4+
google()
45
jcenter()
56
}
67
dependencies {
7-
classpath 'com.android.tools.build:gradle:2.3.3'
8-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
9-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
8+
classpath 'com.android.tools.build:gradle:3.1.3'
9+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
10+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1011
}
1112
}
1213

1314
allprojects {
1415
repositories {
16+
google()
1517
jcenter()
1618
}
1719
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat Nov 11 23:27:31 CET 2017
1+
#Wed Jun 27 20:37:56 CEST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

sample/build.gradle

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,32 @@
11
buildscript {
22
repositories {
3+
google()
34
jcenter()
45
}
5-
dependencies {
6-
// replace with the current version of the android-apt plugin
7-
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
8-
}
96
}
107

118
repositories {
9+
google()
1210
jcenter()
1311
}
1412

1513
apply plugin: 'com.android.application'
16-
apply plugin: 'android-apt'
1714

1815
android {
19-
compileSdkVersion 25
20-
buildToolsVersion "25.0.3"
16+
compileSdkVersion 26
2117

2218
defaultConfig {
23-
minSdkVersion 11
24-
targetSdkVersion 25
19+
minSdkVersion 14
20+
targetSdkVersion 26
2521
versionCode 3
2622
versionName "3.0.0"
2723
}
2824

2925
}
3026

3127
dependencies {
32-
compile project(':android-pdf-viewer')
33-
compile 'com.android.support:appcompat-v7:25.3.1'
34-
provided 'org.androidannotations:androidannotations:4.0.0'
35-
compile 'org.androidannotations:androidannotations-api:4.0.0'
28+
implementation project(':android-pdf-viewer')
29+
implementation 'com.android.support:appcompat-v7:26.1.0'
30+
implementation 'org.androidannotations:androidannotations-api:4.4.0'
31+
annotationProcessor "org.androidannotations:androidannotations:4.4.0"
3632
}

0 commit comments

Comments
 (0)