代码拉取完成,页面将自动刷新
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 }
}
}
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。