Skip to content

Commit d243b39

Browse files
committed
Update version
Replace bintray upload scripts with fixed one Update README and CHANGELOG Fix max zoom detection
1 parent ea59486 commit d243b39

File tree

8 files changed

+135
-33
lines changed

8 files changed

+135
-33
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 3.2.0-beta.1 (2019-08-18)
2+
* Merge PR #714 with optimized page load
3+
* Merge PR #776 with fix for max & min zoom level
4+
* Merge PR #722 with fix for showing right position when view size changed
5+
* Merge PR #703 with fix for too many threads
6+
* Merge PR #702 with fix for memory leak
7+
* Merge PR #689 with possibility to disable long click
8+
* Merge PR #628 with fix for hiding scroll handle
9+
* Merge PR #627 with `fitEachPage` option
10+
* Merge PR #638 and #406 with fixed NPE
11+
* Merge PR #780 with README fix
12+
* Update compile SDK and support library to 28
13+
* Update Gradle and Gradle Plugin
14+
115
## 3.1.0-beta.1 (2018-06-29)
216
* Merge pull request #557 for snapping pages (scrolling page by page)
317
* merge pull request #618 for night mode

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11

2+
# Looking for new maintainer!
23

3-
# Android PdfViewer
4-
5-
6-
__这个分支,在原3.1.0-beta1的基础上,优化了渲染区域的计算方式,减少不必要的渲染区域。__
7-
8-
3.1.0-beta1在计算渲染方式上有个bug,在跨页的时候会渲染上一页的最后一行,不管这一行是不是全部显示在屏幕中。当放大的倍数越大,
9-
需要渲染的块就多,由于最大数量的限制,会导致部分在屏幕下方的区域不会被渲染。
104

5+
# Android PdfViewer
116

127
__AndroidPdfViewer 1.x is available on [AndroidPdfViewerV1](https://github.com/barteksc/AndroidPdfViewerV1)
138
repo, where can be developed independently. Version 1.x uses different engine for drawing document on canvas,
@@ -17,14 +12,19 @@ Library for displaying PDF documents on Android, with `animations`, `gestures`,
1712
It is based on [PdfiumAndroid](https://github.com/barteksc/PdfiumAndroid) for decoding PDF files. Works on API 11 (Android 3.0) and higher.
1813
Licensed under Apache License 2.0.
1914

20-
## What's new in 3.1.0-beta.1?
21-
* Merge pull request #557 for snapping pages (scrolling page by page)
22-
* merge pull request #618 for night mode
23-
* Merge pull request #566 for `OnLongTapListener`
24-
* Update PdfiumAndroid to 1.9.0, which uses `c++_shared` instead of `gnustl_static`
25-
* Update Gradle Plugin
26-
* Update compile SDK and support library to 26
27-
* Change minimum SDK to 14
15+
## What's new in 3.2.0-beta.1?
16+
* Merge PR #714 with optimized page load
17+
* Merge PR #776 with fix for max & min zoom level
18+
* Merge PR #722 with fix for showing right position when view size changed
19+
* Merge PR #703 with fix for too many threads
20+
* Merge PR #702 with fix for memory leak
21+
* Merge PR #689 with possibility to disable long click
22+
* Merge PR #628 with fix for hiding scroll handle
23+
* Merge PR #627 with `fitEachPage` option
24+
* Merge PR #638 and #406 with fixed NPE
25+
* Merge PR #780 with README fix
26+
* Update compile SDK and support library to 28
27+
* Update Gradle and Gradle Plugin
2828

2929
## Changes in 3.0 API
3030
* Replaced `Contants.PRELOAD_COUNT` with `PRELOAD_OFFSET`
@@ -37,7 +37,7 @@ Licensed under Apache License 2.0.
3737

3838
Add to _build.gradle_:
3939

40-
`implementation 'com.github.barteksc:android-pdf-viewer:3.1.0-beta.1'`
40+
`implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'`
4141

4242
or if you want to use more stable version:
4343

android-pdf-viewer/bintray.gradle

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
apply plugin: 'com.github.dcendents.android-maven'
2+
apply plugin: 'com.jfrog.bintray'
3+
4+
group = publishedGroupId
5+
version = libraryVersion
6+
7+
install {
8+
repositories.mavenInstaller {
9+
pom.project {
10+
packaging 'aar'
11+
groupId publishedGroupId
12+
artifactId artifact
13+
14+
name libraryName
15+
description libraryDescription
16+
url siteUrl
17+
18+
licenses {
19+
license {
20+
name licenseName
21+
url licenseUrl
22+
}
23+
}
24+
developers {
25+
developer {
26+
id developerId
27+
name developerName
28+
email developerEmail
29+
}
30+
}
31+
scm {
32+
connection gitUrl
33+
developerConnection gitUrl
34+
url siteUrl
35+
}
36+
}
37+
}
38+
}
39+
40+
task sourcesJar(type: Jar) {
41+
classifier = 'sources'
42+
from android.sourceSets.main.java.srcDirs
43+
}
44+
45+
task javadoc(type: Javadoc) {
46+
source = android.sourceSets.main.java.srcDirs
47+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
48+
}
49+
50+
afterEvaluate {
51+
javadoc.classpath += files(android.libraryVariants.collect { variant ->
52+
variant.javaCompileProvider.get().classpath.files
53+
})
54+
}
55+
56+
task javadocJar(type: Jar, dependsOn: javadoc) {
57+
classifier = 'javadoc'
58+
from javadoc.destinationDir
59+
}
60+
61+
artifacts {
62+
archives javadocJar
63+
archives sourcesJar
64+
}
65+
66+
Properties properties = new Properties()
67+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
68+
69+
bintray {
70+
user = properties.getProperty("bintray.user")
71+
key = properties.getProperty("bintray.apikey")
72+
73+
configurations = ['archives']
74+
pkg {
75+
repo = bintrayRepo
76+
name = bintrayName
77+
desc = libraryDescription
78+
websiteUrl = siteUrl
79+
vcsUrl = gitUrl
80+
licenses = allLicenses
81+
dryRun = false
82+
publish = true
83+
override = false
84+
publicDownloadNumbers = true
85+
version {
86+
desc = libraryDescription
87+
}
88+
}
89+
}

android-pdf-viewer/build.gradle

+6-7
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.1.0-beta.1'
16+
libraryVersion = '3.2.0-beta.1'
1717

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

2727
android {
28-
compileSdkVersion 26
28+
compileSdkVersion 28
2929

3030
defaultConfig {
3131
minSdkVersion 14
32-
targetSdkVersion 26
32+
targetSdkVersion 28
3333
versionCode 1
34-
versionName "3.1.0-beta.1"
34+
versionName "3.2.0-beta.1"
3535
}
3636

3737
}
3838

3939
dependencies {
40-
implementation 'com.android.support:support-compat:26.1.0'
40+
implementation 'com.android.support:support-compat:28.0.0'
4141
api 'com.github.barteksc:pdfium-android:1.9.0'
4242
}
4343

44-
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
45-
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
44+
apply from: 'bintray.gradle'

android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/DragPinchManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public boolean onScale(ScaleGestureDetector detector) {
261261
float dr = detector.getScaleFactor();
262262
float wantedZoom = pdfView.getZoom() * dr;
263263
float minZoom = Math.min(MINIMUM_ZOOM, pdfView.getMinZoom());
264-
float maxZoom = Math.max(MAXIMUM_ZOOM, pdfView.getMaxZoom());
264+
float maxZoom = Math.min(MAXIMUM_ZOOM, pdfView.getMaxZoom());
265265
if (wantedZoom < minZoom) {
266266
dr = minZoom / pdfView.getZoom();
267267
} else if (wantedZoom > maxZoom) {

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.1.3'
9-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
8+
classpath 'com.android.tools.build:gradle:3.4.2'
9+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1111
}
1212
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Jun 27 20:37:56 CEST 2018
1+
#Sun Aug 18 01:14:14 CEST 2019
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.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

sample/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ repositories {
1313
apply plugin: 'com.android.application'
1414

1515
android {
16-
compileSdkVersion 26
16+
compileSdkVersion 28
1717

1818
defaultConfig {
1919
minSdkVersion 14
20-
targetSdkVersion 26
20+
targetSdkVersion 28
2121
versionCode 3
2222
versionName "3.0.0"
2323
}
@@ -26,7 +26,7 @@ android {
2626

2727
dependencies {
2828
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"
29+
implementation 'com.android.support:appcompat-v7:28.0.0'
30+
implementation 'org.androidannotations:androidannotations-api:4.6.0'
31+
annotationProcessor "org.androidannotations:androidannotations:4.6.0"
3232
}

0 commit comments

Comments
 (0)