blob: 6f2bc2f3d6e8de1d60435cfae68f8eca12a37a49 [file] [log] [blame]
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
group = 'com.artifex.mupdf'
version = '1.20.2a'
dependencies {
implementation 'androidx.appcompat:appcompat:1.1.+'
if (file('../jni/build.gradle').isFile())
api project(':jni')
else
api 'com.artifex.mupdf:fitz:1.20.2'
}
android {
compileSdkVersion 31
defaultConfig {
minSdkVersion 21
targetSdkVersion 31
}
publishing {
singleVariant("release") {
withSourcesJar()
}
}
}
project.afterEvaluate {
publishing {
publications {
release(MavenPublication) {
artifactId 'viewer'
artifact(bundleReleaseAar)
pom {
name = 'viewer'
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"
}
}
}
}
}