Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.pycampers.flutterpdfviewer'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.3.31'
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,13 +25,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 28
compileSdkVersion 29

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 19
minSdkVersion 21
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand All @@ -41,9 +41,9 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'com.github.barteksc:android-pdf-viewer:3.1.0-beta.1'
implementation 'com.google.android.exoplayer:exoplayer:2.9.3'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
implementation 'com.google.android.exoplayer:exoplayer:2.11.4'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0-alpha01'
implementation project(path: ':plugin_scaffold')
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import android.os.Bundle
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import com.pycampers.plugin_scaffold.createPluginScaffold
import com.pycampers.plugin_scaffold.trySend
import com.pycampers.plugin_scaffold.trySendError
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar
Expand Down Expand Up @@ -164,16 +163,7 @@ class FlutterPdfViewerMethods(val registrar: Registrar) {
object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val args = intent.extras!!
if (args.containsKey("error")) {
trySendError(
result,
args.getString("error"),
args.getString("message"),
args.getString("stacktrace")
)
} else {
trySend(result)
}
trySend(result)
broadcaster.unregisterReceiver(this)
}
},
Expand All @@ -182,4 +172,4 @@ class FlutterPdfViewerMethods(val registrar: Registrar) {

registrar.activity().startActivity(intent)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,8 @@ class PdfActivityThread(
.onTap(playerController)
.defaultPage(initialPage)

if (opts.containsKey("pages")) {
configurator = configurator.pages(*opts.getIntArray("pages"))
}


configurator.load()
}
}
}
12 changes: 6 additions & 6 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
compileSdkVersion 29

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -38,8 +38,8 @@ android {

defaultConfig {
applicationId "com.pycampers.flutterpdfviewerexample"
minSdkVersion 19
targetSdkVersion 28
minSdkVersion 21
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -65,7 +65,7 @@ flutter {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.3.0-beta01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-beta01'
}
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.3.31'
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0-beta05'
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
flutter:
sdk: flutter

path_provider: ^0.5.0+1
path_provider:

dev_dependencies:
flutter_test:
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: flutter_pdf_viewer
description: A native Pdf viewer for flutter based on Pdfium Android
version: 0.6.1
version: 0.6.2
author: Dev Aggarwal <[email protected]>
homepage: https://github.com/pycampers/flutter_pdf_viewer

environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
sdk: ">=2.1.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

crypto: ^2.0.6
plugin_scaffold: ^1.1.1
crypto:
plugin_scaffold:

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
Expand Down