-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
603 additions
and
120 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
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.
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,21 +1,19 @@ | ||
# Project-wide Gradle settings. | ||
|
||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
|
||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx1536m | ||
|
||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
|
||
# AndroidX package structure to make it clearer which packages are bundled with the | ||
# Android operating system, and which are packaged with your app's APK | ||
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true | ||
# Automatically convert third-party libraries to use AndroidX | ||
android.enableJetifier=true | ||
android.enableJetifier=true |
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 |
---|---|---|
|
@@ -29,100 +29,101 @@ dependencies { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'androidx.appcompat:appcompat:1.1.0' | ||
|
||
api 'com.squareup.okhttp3:okhttp:3.2.0' //okhttp | ||
implementation 'com.google.code.gson:gson:2.7' //解析jsons数据 | ||
api 'com.squareup.okhttp3:okhttp:4.7.2' //okhttp | ||
implementation 'com.google.code.gson:gson:2.8.6' //解析jsons数据 | ||
api 'io.github.lizhangqu:coreprogress:1.0.2' //上传下载回调监听 | ||
} | ||
|
||
//// 这里添加下面两行代码。 | ||
//apply plugin: 'com.github.dcendents.android-maven' | ||
//apply plugin: 'com.jfrog.bintray' | ||
// | ||
//// 定义两个链接,下面会用到。 | ||
//def siteUrl = 'https://github.com/ansen666/OkHttpEncapsulation' // 项目主页。 | ||
//def gitUrl = 'https://github.com/ansen666/OkHttpEncapsulation.git' // Git仓库的url。 | ||
// | ||
//group = "com.ansen.http"// 唯一包名,比如compile 'com.ansen.http:okhttpencapsulation:1.0.1'中的com.ansen.http就是这里配置的。 | ||
//version = "1.0.4"//项目引用的版本号,比如compile 'com.ansen.http:okhttpencapsulation:1.0.1'中的1.0.1就是这里配置的。 | ||
// | ||
//install { | ||
// repositories.mavenInstaller { | ||
// // 生成pom.xml和参数 | ||
// pom { | ||
// project { | ||
// packaging 'aar' | ||
// // 项目描述,复制我的话,这里需要修改。 | ||
// name 'okhttpencapsulation'// 可选,项目名称。 | ||
// description 'okhttp project describe'// 可选,项目描述。 | ||
// url siteUrl // 项目主页,这里是引用上面定义好。 | ||
// | ||
// // 软件开源协议,现在一般都是Apache License2.0吧,复制我的,这里不需要修改。 | ||
// licenses { | ||
// license { | ||
// name 'The Apache Software License, Version 2.0' | ||
// url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
// } | ||
// } | ||
// | ||
// //填写开发者基本信息,复制我的,这里需要修改。 | ||
// developers { | ||
// developer { | ||
// id 'ansen' // 开发者的id。 | ||
// name 'ansen' // 开发者名字。 | ||
// email '[email protected]' // 开发者邮箱。 | ||
// } | ||
// } | ||
// | ||
// // SCM,复制我的,这里不需要修改。 | ||
// scm { | ||
// connection gitUrl // Git仓库地址。 | ||
// developerConnection gitUrl // Git仓库地址。 | ||
// url siteUrl // 项目主页。 | ||
// } | ||
// } | ||
// } | ||
// } | ||
//} | ||
// | ||
//// 生成jar包的task,不需要修改。 | ||
//task sourcesJar(type: Jar) { | ||
// from android.sourceSets.main.java.srcDirs | ||
// classifier = 'sources' | ||
//} | ||
// | ||
//// 生成jarDoc的task,不需要修改。 | ||
//task javadoc(type: Javadoc) { | ||
// source = android.sourceSets.main.java.srcDirs | ||
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
// // destinationDir = file("../javadoc/") | ||
// failOnError false // 忽略注释语法错误,如果用jdk1.8你的注释写的不规范就编译不过。 | ||
//} | ||
// | ||
//// 生成javaDoc的jar,不需要修改。 | ||
//task javadocJar(type: Jar, dependsOn: javadoc) { | ||
// classifier = 'javadoc' | ||
// from javadoc.destinationDir | ||
//} | ||
//artifacts { | ||
// archives javadocJar | ||
// archives sourcesJar | ||
//} | ||
// | ||
//// 这里是读取Bintray相关的信息,我们上传项目到github上的时候会把gradle文件传上去,所以不要把帐号密码的信息直接写在这里,写在local.properties中,这里动态读取。 | ||
//Properties properties = new Properties() | ||
//properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
//bintray { | ||
// user = properties.getProperty("bintray.user")// Bintray的用户名。 | ||
// key = properties.getProperty("bintray.apikey")//Bintray刚才保存的ApiKey。 | ||
// | ||
// configurations = ['archives'] | ||
// pkg { | ||
// repo = "okhttpencapsulation" //Repository名字 需要自己在bintray网站上先添加 | ||
// name = "okhttpencapsulation"// 发布到Bintray上的项目名字,这里的名字不是compile 'com.ansen.library:circleimage:1.0.1'中的circleimage。 | ||
// userOrg = 'anhui'//Bintray的组织id | ||
// websiteUrl = siteUrl | ||
// vcsUrl = gitUrl | ||
// licenses = ["Apache-2.0"] | ||
// publish = true // 是否是公开项目。 | ||
// } | ||
//} | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
// 定义两个链接,下面会用到。 | ||
def siteUrl = 'https://github.com/ansen666/OkHttpEncapsulation' // 项目主页。 | ||
def gitUrl = 'https://github.com/ansen666/OkHttpEncapsulation.git' // Git仓库的url。 | ||
|
||
group = "com.ansen.http"// 唯一包名,比如compile 'com.ansen.http:okhttpencapsulation:1.0.1'中的com.ansen.http就是这里配置的。 | ||
version = "1.0.5"//项目引用的版本号,比如compile 'com.ansen.http:okhttpencapsulation:1.0.1'中的1.0.1就是这里配置的。 | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
// 生成pom.xml和参数 | ||
pom { | ||
project { | ||
packaging 'aar' | ||
// 项目描述,复制我的话,这里需要修改。 | ||
name 'okhttpencapsulation'// 可选,项目名称。 | ||
description 'okhttp project describe'// 可选,项目描述。 | ||
url siteUrl // 项目主页,这里是引用上面定义好。 | ||
|
||
// 软件开源协议,现在一般都是Apache License2.0吧,复制我的,这里不需要修改。 | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
|
||
//填写开发者基本信息,复制我的,这里需要修改。 | ||
developers { | ||
developer { | ||
id 'ansen' // 开发者的id。 | ||
name 'ansen' // 开发者名字。 | ||
email '[email protected]' // 开发者邮箱。 | ||
} | ||
} | ||
|
||
// SCM,复制我的,这里不需要修改。 | ||
scm { | ||
connection gitUrl // Git仓库地址。 | ||
developerConnection gitUrl // Git仓库地址。 | ||
url siteUrl // 项目主页。 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// 生成jar包的task,不需要修改。 | ||
task sourcesJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
classifier = 'sources' | ||
} | ||
|
||
// 生成jarDoc的task,不需要修改。 | ||
task javadoc(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
// destinationDir = file("../javadoc/") | ||
failOnError false // 忽略注释语法错误,如果用jdk1.8你的注释写的不规范就编译不过。 | ||
} | ||
|
||
// 生成javaDoc的jar,不需要修改。 | ||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
artifacts { | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
// 这里是读取Bintray相关的信息,我们上传项目到github上的时候会把gradle文件传上去,所以不要把帐号密码的信息直接写在这里,写在local.properties中,这里动态读取。 | ||
Properties properties = new Properties() | ||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
|
||
bintray { | ||
user = properties.getProperty("bintray.user")// Bintray的用户名。 | ||
key = properties.getProperty("bintray.apikey")//Bintray刚才保存的ApiKey。 | ||
|
||
configurations = ['archives'] | ||
pkg { | ||
repo = "okhttpencapsulation" //Repository名字 需要自己在bintray网站上先添加 | ||
name = "okhttpencapsulation"// 发布到Bintray上的项目名字,这里的名字不是compile 'com.ansen.library:circleimage:1.0.1'中的circleimage。 | ||
userOrg = 'anhui'//Bintray的组织id | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = ["Apache-2.0"] | ||
publish = true // 是否是公开项目。 | ||
} | ||
} |