mirror of
https://github.com/Meituan-Dianping/Logan.git
synced 2025-12-08 19:25:57 +00:00
54 lines
1.3 KiB
Groovy
54 lines
1.3 KiB
Groovy
apply plugin: 'com.github.dcendents.android-maven'
|
|
apply plugin: 'com.jfrog.bintray'
|
|
group = groupId
|
|
artifactId = artifactId
|
|
version = versionCode
|
|
|
|
def getPropertyFromLocalProperties(key) {
|
|
File file = project.rootProject.file('local.properties')
|
|
if (file.exists()) {
|
|
Properties properties = new Properties()
|
|
properties.load(file.newDataInputStream())
|
|
return properties.getProperty(key)
|
|
}
|
|
}
|
|
|
|
def siteUrl = 'https://tech.meituan.com/Logan.html'
|
|
def gitUrl = 'https://github.com/Meituan-Dianping/Logan'
|
|
|
|
bintray {
|
|
user = getPropertyFromLocalProperties("bintray.user")
|
|
key = getPropertyFromLocalProperties("bintray.apikey")
|
|
configurations = ['archives']
|
|
pkg {
|
|
repo = 'maven'
|
|
name = "${project.group}:${project.name}"
|
|
userOrg = 'dianping'
|
|
licenses = ['MIT']
|
|
websiteUrl = siteUrl
|
|
vcsUrl = gitUrl
|
|
publish = true
|
|
}
|
|
}
|
|
|
|
install {
|
|
repositories.mavenInstaller {
|
|
pom {
|
|
project {
|
|
packaging 'aar'
|
|
groupId groupId
|
|
artifactId artifactId
|
|
version versionCode
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
from android.sourceSets.main.java.srcDirs
|
|
classifier = 'sources'
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
} |