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 }