代码拉取完成,页面将自动刷新
plugins {
alias(libs.plugins.detekt)
java
}
buildscript {
dependencies {
classpath(libs.android.gradle)
classpath(libs.kotlin.gradle)
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of("17"))
}
}
subprojects {
// Configure linting
apply<io.gitlab.arturbosch.detekt.DetektPlugin>()
detekt {
buildUponDefaultConfig = true
ignoreFailures = true
config = files("$rootDir/detekt.yaml")
basePath = rootDir.absolutePath
reports {
sarif.enabled = true
}
}
// Configure default Kotlin compiler options
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
// Configure default Android options
plugins.withType<com.android.build.gradle.BasePlugin> {
configure<com.android.build.gradle.BaseExtension> {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
}
}
tasks.withType<Test> {
// Ensure Junit emits the full stack trace when a unit test fails through gradle
useJUnit()
testLogging {
events(
org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR,
org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
)
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。