forked from jeasonlzy/okhttp-OkGo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
版本升级1.6.0,扩展请求功能,一个key可上传多个参数或者文件,增加请求头user-agent等可全局设置的功能
- Loading branch information
Showing
18 changed files
with
363 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
*.iml | ||
.gradle | ||
bintray.gradle | ||
/.idea | ||
/screenshots | ||
/local.properties | ||
.DS_Store | ||
/build | ||
/captures | ||
libs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
version = "0.1.7" // 数据仓库依赖第三部分 | ||
|
||
def siteUrl = 'https://github.com/jeasonlzy0216/OkHttpUtils' | ||
def gitUrl = 'https://github.com/jeasonlzy0216/OkHttpUtils.git' | ||
group = "com.lzy.net" // 数据仓库依赖第一部分 | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
pom { | ||
project { | ||
packaging 'aar' | ||
name 'okhttpserver For Android' // 项目描述 | ||
url siteUrl | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id 'jeasonlzy' // 开发者信息 | ||
name 'LiaoZiYao' // 开发者信息 | ||
email '[email protected]' // 开发者信息 | ||
} | ||
} | ||
scm { | ||
connection gitUrl | ||
developerConnection gitUrl | ||
url siteUrl | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
classifier = 'sources' | ||
} | ||
|
||
task javadoc(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
javadoc { | ||
options { | ||
encoding "UTF-8" | ||
charSet 'UTF-8' | ||
author true | ||
version true | ||
links "http://docs.oracle.com/javase/7/docs/api" | ||
title 'okhttpserver For Android' // 文档标题 | ||
} | ||
} | ||
|
||
artifacts { | ||
// archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
//定义一个函数,target是生成jar包的文件名 | ||
def makeJar(String target) { | ||
exec { | ||
executable "jar" //调用jar | ||
args "cvf", target | ||
args "-C", "build/intermediates/classes/release" | ||
args "", "." | ||
} | ||
} | ||
|
||
//新建一个task,名为buildLib,依赖build(build是一个自带的task) | ||
task buildLib(dependsOn: build) { | ||
makeJar("../lib/okhttpserver-" + version + ".jar") | ||
} | ||
|
||
Properties properties = new Properties() | ||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
bintray { | ||
user = properties.getProperty("bintray.user") | ||
key = properties.getProperty("bintray.apikey") | ||
configurations = ['archives'] | ||
pkg { | ||
repo = "maven" | ||
name = "okhttpserver" // 数据仓库依赖第二部分 | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = ["Apache-2.0"] | ||
publish = true | ||
} | ||
} |
Oops, something went wrong.