1 Star 0 Fork 0

智区域 / KNImageLoader

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
pack-upload.gradle 2.35 KB
一键复制 编辑 原始数据 按行查看 历史
apply plugin: 'maven'
// 指定编码
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
// 打包源码
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
}
// 制作文档(Javadoc)
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
// 本地仓库地址
def URL_LOCAL = "http://localhost:8081/repository/ZhiquyuMaven/"
//判断版本是Release or Snapshots
def isReleaseBuild() {
return !VERSION.contains("SNAPSHOT")
}
//获取仓库url
def getRepositoryUrl() {
return isReleaseBuild() ? "http://47.98.221.180:8081/repository/maven-releases/" : "http://47.98.221.180:8081/repository/maven-snapshots/"
}
// 上传到公共仓库
task uploadToPublic(type: Upload) {
group = 'upload'
configuration = configurations.archives
uploadDescriptor = true
repositories{
mavenDeployer {
repository(url: getRepositoryUrl()) {
authentication(userName: USERNAME, password: PASSWORD)
}
pom.version = VERSION
pom.artifactId = ARTIFACT_ID
pom.groupId = GROUP_ID
}
}
}
// 上传到本机仓库
task uploadToLocal(type: Upload) {
group = 'upload'
configuration = configurations.archives
uploadDescriptor = true
repositories{
mavenDeployer {
repository(url: URL_LOCAL) {
authentication(userName: USERNAME, password: PASSWORD)
}
pom.version = VERSION
pom.artifactId = ARTIFACT_ID
pom.groupId = GROUP_ID
}
}
}
// 压缩生成归档文件
task pack(type: Zip) {
group = 'pack'
archiveName = rootProject.getRootDir().getName() + "_v" + VERSION + ".zip";
destinationDir = rootProject.getRootDir().getParentFile();
from rootProject.getRootDir().getAbsolutePath();
exclude '**.zip'
exclude '**.iml'
exclude '**/**.iml'
exclude 'build/**'
exclude '.idea/**'
exclude '.gradle/**'
exclude 'gradle/**'
exclude '**/build/**'
}
1
https://gitee.com/zhiquyu/KNImageLoader.git
git@gitee.com:zhiquyu/KNImageLoader.git
zhiquyu
KNImageLoader
KNImageLoader
master

搜索帮助