7 Star 23 Fork 0

Gitee 极速下载/retrofit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/square/retrofit
克隆/下载
build.gradle 3.52 KB
一键复制 编辑 原始数据 按行查看 历史
Zongle Wang 提交于 2025-04-03 10:17 +08:00 . Correct ignored sources for errorprone (#4336)
import net.ltgt.gradle.errorprone.CheckSeverity
buildscript {
dependencies {
classpath libs.androidPlugin
classpath libs.kotlin.gradlePlugin
classpath libs.kotlin.serializationPlugin
classpath libs.dokkaPlugin
classpath libs.gradleMavenPublishPlugin
classpath libs.spotlessPlugin
classpath libs.errorpronePlugin
classpath libs.animalSnifferPlugin
classpath libs.protobufPlugin
}
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
}
subprojects {
tasks.withType(JavaCompile).configureEach { task ->
task.options.encoding = 'UTF-8'
}
plugins.withType(JavaBasePlugin).configureEach {
java.toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
tasks.withType(Test).configureEach {
testLogging {
if (System.getenv("CI") == "true") {
events = ["failed", "skipped", "passed"]
}
exceptionFormat "full"
}
}
apply plugin: 'net.ltgt.errorprone'
dependencies {
errorproneJavac libs.errorproneJavac
errorprone libs.errorproneCore
}
tasks.withType(JavaCompile).configureEach { task ->
task.options.errorprone {
excludedPaths = '.*/build/generated/sources/proto/.*'
check('MissingFail', CheckSeverity.ERROR)
check('MissingOverride', CheckSeverity.ERROR)
check('UnusedException', CheckSeverity.ERROR)
check('UnusedMethod', CheckSeverity.ERROR)
check('UnusedNestedClass', CheckSeverity.ERROR)
check('UnusedVariable', CheckSeverity.ERROR)
check('WildcardImport', CheckSeverity.ERROR)
}
}
plugins.withId('java-library') {
project.apply plugin: 'ru.vyarus.animalsniffer'
animalsniffer {
sourceSets = [sourceSets.main] // Only check main sources, ignore test code.
}
dependencies {
signature 'org.codehaus.mojo.signature:java18:1.0@signature'
if (project.path != ':retrofit-converters:java8' &&
project.path != ':retrofit-converters:jaxb' &&
project.path != ':retrofit-converters:jaxb3' &&
project.path != ':retrofit-adapters:java8') {
signature 'net.sf.androidscents.signature:android-api-level-21:5.0.1_r2@signature'
}
}
plugins.apply('com.diffplug.spotless')
spotless {
java {
googleJavaFormat(libs.googleJavaFormat.get().version)
.formatJavadoc(false)
removeUnusedImports()
target 'src/*/java*/**/*.java'
}
kotlin {
ktlint(libs.ktlint.get().version)
.editorConfigOverride([
// Making something an expression body should be a choice around readability.
'ktlint_standard_function-expression-body': 'disabled',
])
target 'src/**/*.kt'
}
}
}
}
tasks.create('clean', Delete) {
delete = layout.buildDirectory
}
tasks.create('prepareWebsite', Copy) {
description = 'Combines the static website along with generated documentation'
group = JavaBasePlugin.DOCUMENTATION_GROUP
into layout.buildDirectory.dir('docs/site')
from('website')
gradle.projectsEvaluated {
into('2.x') {
subprojects { subproject ->
if (subproject.name == 'retrofit-bom') return
if (!subproject.plugins.hasPlugin('com.vanniktech.maven.publish')) return
into(subproject.POM_ARTIFACT_ID) {
if (subproject.plugins.hasPlugin('org.jetbrains.dokka')) {
from subproject.tasks.named('dokkaHtml').flatMap { it.outputDirectory }
} else {
from subproject.tasks.named('javadoc').map { it.destinationDir }
}
}
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/mirrors/retrofit.git
git@gitee.com:mirrors/retrofit.git
mirrors
retrofit
retrofit
trunk

搜索帮助