代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/glide 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import se.bjurr.violations.gradle.plugin.ViolationsTask
buildscript {
repositories {
google()
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.android.tools.build:gradle:${ANDROID_GRADLE_VERSION}"
if (!hasProperty('DISABLE_ERROR_PRONE')) {
classpath "net.ltgt.gradle:gradle-errorprone-plugin:${ERROR_PRONE_PLUGIN_VERSION}"
}
classpath "se.bjurr.violations:violations-gradle-plugin:${VIOLATIONS_PLUGIN_VERSION}"
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.23.0"
}
}
// See http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html.
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
subprojects { project ->
repositories {
google()
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
tasks.withType(JavaCompile) {
sourceCompatibility = 1.7
targetCompatibility = 1.7
options.setBootstrapClasspath(files("${System.getProperty('java.home')}/lib/rt.jar"))
// gifencoder is a legacy project that has a ton of warnings and is basically never
// modified, so we're not going to worry about cleaning it up.
// Imgur uses generated code from dagger that has warnings.
if ("gifencoder" != project.getName() && "imgur" != project.getName()) {
options.compilerArgs \
/*
* Treat all warnings as errors.
*/ \
<< "-Werror" \
/*
* Enable all warnings.
*/ \
<< "-Xlint:all" \
/*
* Java expects every annotation to have a processor, but we use
* javax.annotation.Nullable, which doesn't have one.
*/ \
<< "-Xlint:-processing" \
/*
* See https://github.com/google/dagger/issues/945
* and https://bugs.openjdk.java.net/browse/JDK-8190452
*/ \
<< "-Xlint:-classfile" \
/*
* Disable deprecation warnings for ViewTarget/BaseTarget for now.
*/ \
<< "-Xlint:-deprecation"
if (project.plugins.hasPlugin('net.ltgt.errorprone')) {
// It's often useful to track individual objects when debugging object pooling.
options.compilerArgs << "-Xep:ObjectToString:OFF"
}
}
}
tasks.withType(Test) {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
}
}
// Avoid issues like #2452.
tasks.withType(Jar) {
duplicatesStrategy = DuplicatesStrategy.FAIL
}
def isDisallowedProject =
project.name in ["third_party", "gif_decoder", "gif_encoder", "disklrucache"]
if (!isDisallowedProject) {
apply plugin: "com.diffplug.gradle.spotless"
spotless {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/resources/**'
exclude '**/build/**'
}
googleJavaFormat()
}
}
}
apply plugin: 'checkstyle'
checkstyle {
toolVersion = '8.5'
}
checkstyle {
configFile = rootProject.file('checkstyle.xml')
configProperties.checkStyleConfigDir = rootProject.rootDir
}
task checkstyle(type: Checkstyle) {
source 'src'
include '**/*.java'
exclude '**/gen/**'
// Caught by the violations plugin.
ignoreFailures = true
// empty classpath
classpath = files()
}
apply plugin: "se.bjurr.violations.violations-gradle-plugin"
task violations(type: ViolationsTask) {
minSeverity 'INFO'
detailLevel 'VERBOSE'
maxViolations = 0
diffMaxViolations = 0
// Formats are listed here: https://github.com/tomasbjerre/violations-lib
def dir = projectDir.absolutePath
violations = [
["FINDBUGS", dir, ".*/findbugs/.*\\.xml\$", "Findbugs"],
["PMD", dir, ".*/pmd/.*\\.xml\$", "PMD"],
["ANDROIDLINT", dir, ".*/lint-results\\.xml\$", "AndroidLint"],
["CHECKSTYLE", dir, ".*/checkstyle/.*\\.xml\$", "Checkstyle"],
]
}
afterEvaluate {
if (project.tasks.findByName('check')) {
check.dependsOn('checkstyle')
check.finalizedBy violations
}
if (project.hasProperty("android")
&& project.name != 'pmd'
&& project.name != 'findbugs') {
android {
lintOptions {
warningsAsErrors true
quiet true
// Caught by the violations plugin.
abortOnError false
}
}
android.variantFilter { variant ->
if(variant.buildType.name == 'release') {
variant.setIgnore(true)
}
}
}
if (project.plugins.hasPlugin('com.android.library')) {
android.libraryVariants.all {
it.generateBuildConfigProvider.configure { enabled = false }
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。