Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yhyzgn committed Jun 21, 2021
1 parent fb29b00 commit e1cd013
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 31 deletions.
37 changes: 7 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ tasks.withType(GenerateModuleMetadata) {
enabled = false
}

compileJava.dependsOn(clean)

// https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#packaging-executable.and-plain-archives
jar {
enabled true
Expand All @@ -48,31 +50,6 @@ jar {
}
}

javadoc {
description = "生成jar格式的javadoc。"
// 只显示 protected 和 public 的类和成员
options.memberLevel = JavadocMemberLevel.PROTECTED
options.author = true
options.version = true
options.header = project.name
// 静默javadoc检查(比如不支持@date会报错等),jdk 8+
options.addStringOption('Xdoclint:none', '-quiet')
// 防止本地打开中文乱码
options.addStringOption("charset", "UTF-8")
// suppress warnings due to cross-module @see and @link references;
// note that global 'api' task does display all warnings.
logging.captureStandardError LogLevel.INFO
// suppress "## warnings" message
logging.captureStandardOutput LogLevel.INFO
// 编码一定要配置否则直接出错
options.encoding = "UTF-8"
options.charSet = "UTF-8"
// java9
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}

dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'

Expand Down Expand Up @@ -169,13 +146,13 @@ publishing {
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
// username = ossrhUsername
// password = ossrhPassword
username = ossrhUsername
password = ossrhPassword
}
}
}
}

//signing {
// sign publishing.publications.mavenJava
//}
signing {
sign publishing.publications.mavenJava
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ public Request create(OkHttpClient.Builder client, Object[] args) throws IOExcep
bld.header("User-Agent", "Pigeon/" + Utils.VERSION);
// 静态 header
if (null != headerMap) {
headerMap.forEach(bld::header);
headerMap.forEach((k, v) -> {
if (null != k && null != v) {
bld.header(k, v);
}
});
}
// 动态 header
if (null != dynamicHeaders) {
Expand Down

0 comments on commit e1cd013

Please sign in to comment.