Gradle 1.3之前的Publishing artifacts
在Gradle1.3之前,Publishing artifacts是使用uploadConfigurationName来publish
声明artifacts是靠使用
build.gradle
artifacts {
artifact
}
声明。
生成artifact:可以使用三种途径:
1、使用已定义的任务:
task myJar(type: Jar)
artifacts {
archives myJar
}
2、使用一个file:
def someFile = file('build/somefile.txt')
artifacts {
archives someFile
}
3、自定义一个artifact
task myTask(type: MyTaskType) {
destFile = file('build/somefile.txt')
}
artifacts {
archives(myTask.destFile) {
name 'my-artifact'
type 'text'
builtBy myTask
}
}
开始上传:
repositories {
flatDir {
name "fileRepo"
dirs "repo"
}
}
uploadArchives {
repositories {
add project.repositories.fileRepo
ivy {
credentials {
username "username"
password "pw"
}
url "http://repo.mycompany.com"
}
}
}
这个uploadArchives 其实就是uploadConfigurationName,其中archives就是上文中的artifacts 的configurationName
备注:gradle1.3之后采用新的机制上传组件,这个待下篇分讲。
Gradle 1.3之前的Publishing artifacts的更多相关文章
- Gradle用户指南(章8:依赖关系管理基础)
章8:依赖关系管理基础 本章将介绍一些gradle依赖关系管理的基础 什么是依赖关系管理? 简略的说,依赖管理是由两部分组成的.首先,gradle需要知道你要构建或者运行的项目,以便找到它们.我们将这 ...
- Gradle cookbook(转)
build.gradle apply plugin:"java" [compileJava,compileTestJava,javadoc]*.options*.encoding ...
- Gradle初探
(一):创建一个Gradle项目 1. 环境准备 1.1. 先上Gradle官网下载最新版的程序,地址:https://gradle.org/gradle-download/. 1.2. 配置环境变量 ...
- Gradle 1.12用户指南翻译——第六十五章. Maven 发布(新)
其他章节的翻译请参见:http://blog.csdn.net/column/details/gradle-translation.html翻译项目请关注Github上的地址:https://gith ...
- Gradle之依赖管理
Gradle之依赖管理 泡在网上的日子 / 文 发表于2015-01-29 16:12 第8824次阅读 Gradle,Android Studio 2 编辑推荐:稀土掘金,这是一个针对技术开发者的一 ...
- 【转载】Gradle学习 第八章:依赖管理基础
转载地址:http://ask.android-studio.org/?/article/10 This chapter introduces some of the basics of depend ...
- Chapter 4. Using the Gradle Command-Line 使用gradle命令行
This chapter introduces the basics of the Gradle command-line. You run a build using the gradle comm ...
- 初识构建工具-gradle
构建工具的作用 依赖管理 测试,打包,发布 主流的构建工具 Ant:提供编译,测试,打包 Maven:在Ant的基础上提供了依赖管理和发布的功能 Gradle:在Maven的基础上使用Groovy管理 ...
- Gradle 1.12用户指南翻译——第六十四章. 发布到Ivy(新)
其他章节的翻译请参见:http://blog.csdn.net/column/details/gradle-translation.html翻译项目请关注Github上的地址:https://gith ...
随机推荐
- Jquery和一些Html控件
1.1 Jquery中如何获取各种Html控件的值 1.$("#ID").val(); 2.Check获取选中的值:$("#ID").is(&quo ...
- github概念和实战
fork: 通过fork操作,你将拥有了别人创建的repo的ownership,但是url却变成了/youraccount/repo,这时你将可以做git push操作 clone: 该命令是直接将r ...
- R语言,NA,NAN
好莫名其妙的结果 is.na() #NA得不到的值is.nan() #NAN不可能的值is.infinite() #无穷的 x1<-NA x2<-0/0x3<-1/0 is.na(x ...
- css各浏览器的兼容性写法
各浏览器下的兼容性写法 老版Chrome -webkit-xxx FF -moz-xxx IE9 -ms-xxx opera ...
- 【第三篇】说说javascript处理时间戳
在做datagrid的时候,从数据库读出来的数据是/Date(1437705873240)/大概是这种形式,这个就是时间戳 我们需要把/Data和/去掉,才可以转成我们要的格式. 上代码 { fiel ...
- UINavigationController的使用
1.UINavigationController使用流程 UINavigationController为导航控制器,在iOS里经常用到. 我们看看它的如何使用: 下面的图显示了导航控制器的流程.最左侧 ...
- 创建一个进程并调用(.net)
最近有一个项目需求,需要调用一个exe,就上网查询了一下,顺利的完成了工作,感觉虽然简单,但挺有意思,就记录一下. 一,创建一个进程 1,代码视图(控制台程序) 2,代码 using System; ...
- iso中自动伸缩属性
一.自动伸缩属性 UIViewAutoresizingNone 不伸缩 UIViewAutoresizingFlexibleLeftMargin 跟父控件左边的距离 ...
- 【C#学习笔记】函数调用
using System; namespace ConsoleApplication { class Program { static int Add(int a, int b) { return a ...
- ora-0000 normal跟/etc/hosts有关
当hosts文件配置错误时,用sqlplus登录后startup nomount,就会报错ORA-00000 [oracle11g@testdb2 dbs]$ sqlplus "/ as s ...