Skip to content

Commit 41ff327

Browse files
author
Vasyl Koshkin
committed
Update gradle and configuration files
1 parent d243b39 commit 41ff327

File tree

10 files changed

+122
-160
lines changed

10 files changed

+122
-160
lines changed

android-pdf-viewer/bintray.gradle

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

android-pdf-viewer/build.gradle

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,58 @@
1-
apply plugin: 'com.android.library'
2-
3-
ext {
4-
bintrayRepo = 'maven'
5-
bintrayName = 'android-pdf-viewer'
6-
7-
publishedGroupId = 'com.github.barteksc'
8-
libraryName = 'AndroidPdfViewer'
9-
artifact = 'android-pdf-viewer'
10-
11-
libraryDescription = 'Android view for displaying PDFs rendered with PdfiumAndroid'
12-
13-
siteUrl = 'https://github.com/barteksc/AndroidPdfViewer'
14-
gitUrl = 'https://github.com/barteksc/AndroidPdfViewer.git'
15-
16-
libraryVersion = '3.2.0-beta.1'
17-
18-
developerId = 'barteksc'
19-
developerName = 'Bartosz Schiller'
20-
developerEmail = 'barteksch@boo.pl'
21-
22-
licenseName = 'The Apache Software License, Version 2.0'
23-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
24-
allLicenses = ["Apache-2.0"]
1+
plugins {
2+
id 'com.android.library'
3+
id 'maven-publish'
254
}
265

276
android {
28-
compileSdkVersion 28
7+
namespace "com.github.barteksc.pdfviewer"
8+
9+
compileSdk rootProject.tools.compileSdk
2910

3011
defaultConfig {
31-
minSdkVersion 14
32-
targetSdkVersion 28
12+
minSdk rootProject.tools.minSdk
13+
targetSdk rootProject.tools.targetSdk
14+
3315
versionCode 1
34-
versionName "3.2.0-beta.1"
16+
versionName "${rootProject.tools.versionName}"
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23+
}
3524
}
3625

26+
compileOptions {
27+
sourceCompatibility JavaVersion.VERSION_17
28+
targetCompatibility JavaVersion.VERSION_17
29+
}
30+
31+
publishing {
32+
publishing {
33+
singleVariant("release") {
34+
withSourcesJar()
35+
withJavadocJar()
36+
}
37+
}
38+
}
3739
}
3840

3941
dependencies {
40-
implementation 'com.android.support:support-compat:28.0.0'
41-
api 'com.github.barteksc:pdfium-android:1.9.0'
42+
implementation 'androidx.appcompat:appcompat:1.6.1'
43+
api 'com.github.lion1988dev:PdfiumAndroid:1.9.1'
4244
}
4345

44-
apply from: 'bintray.gradle'
46+
publishing {
47+
publications {
48+
release(MavenPublication) {
49+
groupId = 'com.github.lion1988dev'
50+
artifactId = 'com.github.barteksc.pdfviewer'
51+
version = "3.2.1"
52+
53+
afterEvaluate {
54+
from components.release
55+
}
56+
}
57+
}
58+
}

android-pdf-viewer/consumer-rules.pro

Whitespace-only changes.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
22+
-keep class com.shockwave.**
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.github.barteksc.pdfviewer">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
</manifest>

build.gradle

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
2-
buildscript {
3-
repositories {
4-
google()
5-
jcenter()
6-
}
7-
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.4.2'
9-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
10-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
11-
}
1+
plugins {
2+
id 'com.android.application' version '8.3.0' apply false
3+
id 'com.android.library' version '8.3.0' apply false
124
}
135

14-
allprojects {
15-
repositories {
16-
google()
17-
jcenter()
18-
}
6+
ext {
7+
tools = [
8+
minSdk : 23,
9+
targetSdk : 34,
10+
compileSdk : 34,
11+
versionName: '3.2.1'
12+
]
1913
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Aug 18 01:14:14 CEST 2019
1+
#Sun Mar 10 12:47:57 EET 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

sample/build.gradle

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
buildscript {
2-
repositories {
3-
google()
4-
jcenter()
5-
}
6-
}
7-
8-
repositories {
9-
google()
10-
jcenter()
1+
plugins {
2+
id 'com.android.application'
113
}
124

13-
apply plugin: 'com.android.application'
14-
155
android {
16-
compileSdkVersion 28
6+
namespace "com.github.barteksc.sample"
7+
8+
compileSdk rootProject.tools.compileSdk
179

1810
defaultConfig {
19-
minSdkVersion 14
20-
targetSdkVersion 28
11+
minSdk rootProject.tools.minSdk
12+
targetSdk rootProject.tools.targetSdk
13+
2114
versionCode 3
22-
versionName "3.0.0"
23-
}
15+
versionName "${rootProject.tools.versionName}"
2416

17+
javaCompileOptions {
18+
annotationProcessorOptions {
19+
arguments = ["androidManifestFile": "$projectDir/src/main/AndroidManifest.xml".toString()]
20+
}
21+
}
22+
}
2523
}
2624

2725
dependencies {
26+
implementation 'androidx.appcompat:appcompat:1.6.1'
2827
implementation project(':android-pdf-viewer')
29-
implementation 'com.android.support:appcompat-v7:28.0.0'
28+
// implementation 'com.github.lion1988dev:AndroidPdfViewer:3.2.1'
29+
3030
implementation 'org.androidannotations:androidannotations-api:4.6.0'
31+
3132
annotationProcessor "org.androidannotations:androidannotations:4.6.0"
3233
}

sample/src/main/AndroidManifest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
android:icon="@drawable/ic_launcher"
88
android:label="@string/app_name"
99
android:theme="@style/Theme.AppCompat.Light">
10+
1011
<activity
1112
android:name="PDFViewActivity_"
12-
android:label="@string/app_name" >
13+
android:exported="true">
14+
1315
<intent-filter>
1416
<action android:name="android.intent.action.MAIN" />
1517
<category android:name="android.intent.category.LAUNCHER" />
1618
</intent-filter>
19+
1720
</activity>
21+
1822
</application>
1923

2024
</manifest>

settings.gradle

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
google()
5+
mavenCentral()
6+
}
7+
}
8+
dependencyResolutionManagement {
9+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10+
repositories {
11+
google()
12+
mavenCentral()
13+
maven { url 'https://jitpack.io' }
14+
}
15+
}
16+
rootProject.name = "AndroidPdfViewer demo"
17+
118
include ':android-pdf-viewer'
2-
include ':sample'
19+
include ':sample'

0 commit comments

Comments
 (0)