2 Star 0 Fork 0

mirrors_Meituan-Dianping / walle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mt_maven.gradle 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
袭建帅 提交于 2018-09-27 10:21 . update
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
group = GROUP
version = VERSION_NAME
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 getRepositoryUrl() {
return isSnapshot() ? getPropertyFromLocalProperties("SNAPSHOT_REPOSITORY_URL") : getPropertyFromLocalProperties("RELEASE_REPOSITORY_URL")
}
def isSnapshot() {
return version.endsWith("SNAPSHOT");
}
def hasAndroidPlugin() {
return getPlugins().inject(false) { a, b->
def classStr = b.getClass().name
def isAndroid = ("com.android.build.gradle.LibraryPlugin" == classStr) || ("com.android.build.gradle.AppPlugin" == classStr)
a || isAndroid
}
}
task sourcesJar(type: Jar) {
if (hasAndroidPlugin()) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
} else {
from sourceSets.main.allSource
classifier = 'sources'
}
}
artifacts {
archives sourcesJar
}
uploadArchives {
repositories.mavenDeployer {
repository(url: repositoryUrl) {
authentication(userName: getPropertyFromLocalProperties("USER"), password: getPropertyFromLocalProperties("PASSWORD"))
}
}
}
bintray {
user = getPropertyFromLocalProperties("bintray.user")
key = getPropertyFromLocalProperties("bintray.apikey")
configurations = ['archives']
pkg {
repo = 'maven'
name = "${project.group}:${project.name}"
userOrg = 'meituan'
licenses = ['Apache-2.0']
websiteUrl = 'http://tech.meituan.com/android-apk-v2-signature-scheme.html'
vcsUrl = 'https://github.com/Meituan-Dianping/walle'
publish = true
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_Meituan-Dianping/walle.git
git@gitee.com:mirrors_Meituan-Dianping/walle.git
mirrors_Meituan-Dianping
walle
walle
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891