代码拉取完成,页面将自动刷新
buildscript {
repositories {
google()
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21'
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:perf-plugin:1.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
}
}
plugins {
id 'com.github.ben-manes.versions' version '0.27.0'
}
allprojects {
repositories {
google()
//mavenLocal() must be listed at the top to facilitate testing
mavenLocal()
jcenter()
}
def isNonStable = { candidate ->
return ['alpha', 'beta', 'rc', 'snapshot', '-m'].any { word ->
return candidate.version.toLowerCase().contains(word)
}
}
def isBlocked = { candidate ->
def blocklist = [
'androidx.browser:browser',
'com.facebook.android',
'com.google.guava',
'com.github.bumptech.glide'
]
return blocklist.any { word ->
return candidate.toString().contains(word)
}
}
dependencyUpdates {
rejectVersionIf {
isNonStable(it.candidate) || isBlocked(it.candidate)
}
}
}
configurations {
ktlint
}
dependencies {
ktlint "com.github.shyiko:ktlint:0.31.0"
}
task("ktlint", type: JavaExec, group: "verification") {
def outputDir = "${project.buildDir}/reports/ktlint/"
def inputFiles = project.fileTree(dir: "src", include: "**/*.kt")
def outputFile = "${outputDir}ktlint-checkstyle-report.xml"
// See:
// https://medium.com/@vanniktech/making-your-gradle-tasks-incremental-7f26e4ef09c3
inputs.files(inputFiles)
outputs.dir(outputDir)
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args = [
"--format",
"--android",
"--reporter=plain",
"--reporter=checkstyle,output=${outputFile}",
"**/*.kt",
]
}
task clean(type: Delete) {
delete rootProject.buildDir
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。