123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 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
- }
|