forked from hongyangAndroid/okhttputils
-
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.
对应okhttp3.3.1 更新相应API;回调中添加id参数用于标识特定的id
- Loading branch information
hongyangAndroid
committed
Jun 1, 2016
1 parent
d779ac5
commit b514bf9
Showing
38 changed files
with
231 additions
and
256 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Sat Nov 07 14:53:41 GMT+08:00 2015 | ||
#Wed Jun 01 11:58:20 GMT+08:00 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip |
Binary file not shown.
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
apply plugin: 'com.jfrog.bintray' | ||
apply plugin: 'com.novoda.bintray-release'//添加 | ||
|
||
version = "2.5.2" | ||
|
||
android { | ||
compileSdkVersion 23 | ||
|
@@ -22,94 +20,11 @@ android { | |
} | ||
lintOptions{ | ||
abortOnError false | ||
warning 'InvalidPackage' | ||
} | ||
|
||
} | ||
|
||
def siteUrl = 'https://github.com/hongyangAndroid/okhttp-utils' // #CONFIG# // project homepage | ||
def gitUrl = 'https://github.com/hongyangAndroid/okhttp-utils.git' // #CONFIG# // project git | ||
group = "com.zhy" | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
// This generates POM.xml with proper parameters | ||
pom { | ||
project { | ||
packaging 'aar' | ||
name 'okhttputils' // #CONFIG# // project title | ||
url siteUrl | ||
// Set your license | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id 'hongyangAndroid' // #CONFIG# // your user id (you can write your nickname) | ||
name 'ZhangHongyang' // #CONFIG# // your user name | ||
email '[email protected]' // #CONFIG# // your email | ||
} | ||
} | ||
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 | ||
} | ||
|
||
artifacts { | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
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 = "okhttputils" // #CONFIG# project name in jcenter | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = ["Apache-2.0"] | ||
publish = true | ||
} | ||
} | ||
|
||
|
||
//定义一个函数,target是生成jar包的文件名,classDir是class文件所在的文件夹 | ||
def makeJar(String target,String classDir){ | ||
exec{ | ||
executable "jar" //调用jar | ||
args "cvf",target | ||
args "-C", classDir | ||
args "","." | ||
|
||
|
||
} | ||
} | ||
|
||
|
||
task clearJar(type: Delete) { | ||
delete 'build/outputs/okhttputils.jar' | ||
|
@@ -119,7 +34,7 @@ task makeJar(type: Copy) { | |
from('build/intermediates/bundles/release/') | ||
into('build/outputs/') | ||
include('classes.jar') | ||
rename ('classes.jar', 'okhttputils-2_5_2.jar') | ||
rename ('classes.jar', 'okhttputils-2_6_1.jar') | ||
} | ||
|
||
makeJar.dependsOn(clearJar, build) | ||
|
@@ -128,5 +43,16 @@ makeJar.dependsOn(clearJar, build) | |
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
compile 'com.squareup.okhttp3:okhttp:3.2.0' | ||
compile 'com.squareup.okhttp3:okhttp:3.3.1' | ||
} | ||
|
||
//添加 | ||
publish { | ||
userOrg = 'hongyangandroid'//bintray.com用户名 | ||
groupId = 'com.zhy'//jcenter上的路径 | ||
artifactId = 'okhttputils'//项目名称 | ||
publishVersion = '2.6.1'//版本号 | ||
desc = 'Oh hi, this is a nice description for a project, right?' | ||
website = 'https://github.com/hongyangAndroid/okhttp-utils' | ||
} | ||
|
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
Oops, something went wrong.