-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (91 loc) · 2.11 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
group = 'com.artifex.mupdf'
version = '1.22.0'
buildscript {
repositories {
if (project.hasProperty('MAVEN_REPO')) {
maven { url MAVEN_REPO }
} else {
maven { url "file://${System.properties['user.home']}/MAVEN" }
}
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
}
}
allprojects {
repositories {
if (project.hasProperty('MAVEN_REPO')) {
maven { url MAVEN_REPO }
} else {
maven { url "file://${System.properties['user.home']}/MAVEN" }
}
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
android {
compileSdkVersion 31
defaultConfig {
minSdkVersion 21
targetSdkVersion 31
externalNativeBuild.ndkBuild.arguments '-j4'
// Set ABI_FILTERS in your gradle.properties file
if (project.hasProperty('ABI_FILTERS')) {
ndk.abiFilters = []
ndk.abiFilters.addAll(ABI_FILTERS.split(',').collect{it as String})
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs 'libmupdf/platform/java/src'
}
}
externalNativeBuild {
ndkBuild.path 'libmupdf/platform/java/Android.mk'
}
}
project.afterEvaluate {
publishing {
publications {
release(MavenPublication) {
artifactId 'fitz'
artifact(bundleReleaseAar)
pom {
name = 'fitz'
url = 'http://www.mupdf.com'
licenses {
license {
name = 'GNU Affero General Public License'
url = 'https://www.gnu.org/licenses/agpl-3.0.html'
}
}
}
pom.withXml {
final dependenciesNode = asNode().appendNode('dependencies')
configurations.implementation.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
repositories {
maven {
name 'Local'
if (project.hasProperty('MAVEN_REPO')) {
url = MAVEN_REPO
} else {
url = "file://${System.properties['user.home']}/MAVEN"
}
}
}
}
}