mirror of
https://github.com/tachiyomiorg/extensions-lib.git
synced 2024-11-25 04:36:55 +01:00
Bintray publishing
This commit is contained in:
parent
77e6b90097
commit
797094cc1a
@ -8,6 +8,8 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.2.3'
|
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1'
|
||||||
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
apply plugin: 'com.jfrog.bintray'
|
||||||
|
|
||||||
|
version = '1.0'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 25
|
compileSdkVersion 25
|
||||||
buildToolsVersion "25.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName version
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@ -18,9 +22,6 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
|
||||||
tasks.lint.enabled = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -34,15 +35,101 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
task clearJar(type: Delete) {
|
ext {
|
||||||
delete 'build/outputs/library.jar'
|
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"]
|
||||||
}
|
}
|
||||||
|
|
||||||
task makeJar(type: Copy) {
|
group = publishedGroupId
|
||||||
from('build/intermediates/bundles/release/')
|
archivesBaseName = artifact
|
||||||
into('build/outputs/')
|
|
||||||
include('classes.jar')
|
install {
|
||||||
rename ('classes.jar', 'library.jar')
|
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
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
makeJar.dependsOn(clearJar, build)
|
task sourcesJar(type: Jar) {
|
||||||
|
classifier = '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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user