Skip to content

Commit

Permalink
Update version
Browse files Browse the repository at this point in the history
Replace bintray upload scripts with fixed one
Update README and CHANGELOG
Fix max zoom detection
  • Loading branch information
barteksc committed Aug 18, 2019
1 parent ea59486 commit d243b39
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 33 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 3.2.0-beta.1 (2019-08-18)
* Merge PR #714 with optimized page load
* Merge PR #776 with fix for max & min zoom level
* Merge PR #722 with fix for showing right position when view size changed
* Merge PR #703 with fix for too many threads
* Merge PR #702 with fix for memory leak
* Merge PR #689 with possibility to disable long click
* Merge PR #628 with fix for hiding scroll handle
* Merge PR #627 with `fitEachPage` option
* Merge PR #638 and #406 with fixed NPE
* Merge PR #780 with README fix
* Update compile SDK and support library to 28
* Update Gradle and Gradle Plugin

## 3.1.0-beta.1 (2018-06-29)
* Merge pull request #557 for snapping pages (scrolling page by page)
* merge pull request #618 for night mode
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@

# Looking for new maintainer!

# Android PdfViewer


__这个分支,在原3.1.0-beta1的基础上,优化了渲染区域的计算方式,减少不必要的渲染区域。__

3.1.0-beta1在计算渲染方式上有个bug,在跨页的时候会渲染上一页的最后一行,不管这一行是不是全部显示在屏幕中。当放大的倍数越大,
需要渲染的块就多,由于最大数量的限制,会导致部分在屏幕下方的区域不会被渲染。

# Android PdfViewer

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

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

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

Add to _build.gradle_:

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

or if you want to use more stable version:

Expand Down
89 changes: 89 additions & 0 deletions android-pdf-viewer/bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

group = publishedGroupId
version = libraryVersion

install {
repositories.mavenInstaller {
pom.project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

name libraryName
description libraryDescription
url siteUrl

licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

afterEvaluate {
javadoc.classpath += files(android.libraryVariants.collect { variant ->
variant.javaCompileProvider.get().classpath.files
})
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
dryRun = false
publish = true
override = false
publicDownloadNumbers = true
version {
desc = libraryDescription
}
}
}
13 changes: 6 additions & 7 deletions android-pdf-viewer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
siteUrl = 'https://github.com/barteksc/AndroidPdfViewer'
gitUrl = 'https://github.com/barteksc/AndroidPdfViewer.git'

libraryVersion = '3.1.0-beta.1'
libraryVersion = '3.2.0-beta.1'

developerId = 'barteksc'
developerName = 'Bartosz Schiller'
Expand All @@ -25,21 +25,20 @@ ext {
}

android {
compileSdkVersion 26
compileSdkVersion 28

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "3.1.0-beta.1"
versionName "3.2.0-beta.1"
}

}

dependencies {
implementation 'com.android.support:support-compat:26.1.0'
implementation 'com.android.support:support-compat:28.0.0'
api 'com.github.barteksc:pdfium-android:1.9.0'
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
apply from: 'bintray.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public boolean onScale(ScaleGestureDetector detector) {
float dr = detector.getScaleFactor();
float wantedZoom = pdfView.getZoom() * dr;
float minZoom = Math.min(MINIMUM_ZOOM, pdfView.getMinZoom());
float maxZoom = Math.max(MAXIMUM_ZOOM, pdfView.getMaxZoom());
float maxZoom = Math.min(MAXIMUM_ZOOM, pdfView.getMaxZoom());
if (wantedZoom < minZoom) {
dr = minZoom / pdfView.getZoom();
} else if (wantedZoom > maxZoom) {
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Jun 27 20:37:56 CEST 2018
#Sun Aug 18 01:14:14 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
10 changes: 5 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ repositories {
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
compileSdkVersion 28

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 28
versionCode 3
versionName "3.0.0"
}
Expand All @@ -26,7 +26,7 @@ android {

dependencies {
implementation project(':android-pdf-viewer')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'org.androidannotations:androidannotations-api:4.4.0'
annotationProcessor "org.androidannotations:androidannotations:4.4.0"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'org.androidannotations:androidannotations-api:4.6.0'
annotationProcessor "org.androidannotations:androidannotations:4.6.0"
}

0 comments on commit d243b39

Please sign in to comment.