tachiyomi-extensions-lib/library/build.gradle
TacoTheDank f1811a816f
Modernize the project to match its usage in extensions (#1)
* Update gradle wrapper

* Delete unneeded files

* Update plugins, compile with JDK8

* Fix deprecation in Gradle

* Update okhttp and rxjava to match tachiyomi-extensions

* Sort modifiers, clean manifest

* Update compileSdk to match tachiyomi-extensions
2020-05-05 22:41:50 -04:00

140 lines
3.3 KiB
Groovy

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
version = '1.2'
android {
compileSdkVersion 27
buildToolsVersion "29.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName version
}
buildTypes {
release {
minifyEnabled false
}
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compileOnly 'com.squareup.okhttp3:okhttp:3.10.0'
compileOnly 'io.reactivex:rxjava:1.3.6'
compileOnly 'org.jsoup:jsoup:1.10.2'
}
ext {
bintrayRepo = 'tachiyomi'
bintrayName = 'extensions-library'
publishedGroupId = 'eu.kanade.tachiyomi'
libraryName = 'tachiyomi-extensions-lib'
artifact = 'extensions-library'
libraryDescription = 'Tachiyomi library to create new catalogues'
siteUrl = 'https://github.com/inorichi/tachiyomi-extensions-lib'
gitUrl = 'https://github.com/inorichi/tachiyomi-extensions-lib.git'
githubRepository = 'inorichi/tachiyomi-extensions-lib'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
group = publishedGroupId
archivesBaseName = artifact
install {
repositories.mavenInstaller {
pom.project {
packaging 'jar'
groupId publishedGroupId
artifactId artifact
name libraryName
description libraryDescription
url siteUrl
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id 'inorichi'
name 'Javier Tomas'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
task makeJar(type: Jar) {
from zipTree('build/intermediates/bundles/release/classes.jar')
}
artifacts {
archives sourcesJar
archives makeJar
}
// Bintray
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
issueTrackerUrl = siteUrl + '/issues'
vcsUrl = gitUrl
licenses = allLicenses
githubRepo = githubRepository
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true
passphrase = properties.getProperty("bintray.gpg.password")
}
}
}
}