代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/glide 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import se.bjurr.violations.gradle.plugin.ViolationsTask
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath libs.android.gradle
if (!hasProperty('DISABLE_ERROR_PRONE')) {
classpath libs.errorprone.gradle
}
classpath libs.proguard.gradle
classpath libs.violations
classpath libs.androidx.benchmark.gradle
classpath libs.kotlin.gradle
classpath libs.ksp.gradle
classpath libs.coroutines.binarycompat.gradle
classpath libs.dokka.gradle
classpath 'com.guardsquare:proguard-gradle:' + (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11) ? '7.3.2' : '7.1.0')
}
}
repositories {
google()
mavenCentral()
}
apply plugin: 'binary-compatibility-validator'
apply plugin: 'org.jetbrains.dokka'
apiValidation {
ignoredProjects += ["ksp", "test", "gallery", "integrationtest", "sqljournaldiskcache"]
nonPublicMarkers += ["com.bumptech.glide.integration.ktx.InternalGlideApi"]
}
// 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')
}
}
}
dokkaHtmlMultiModule.configure {
moduleName.set("Glide")
}
afterEvaluate {
tasks.named("dokkaHtmlMultiModule") {
pluginsMapConfiguration.set(
[
"org.jetbrains.dokka.base.DokkaBase": """{
"customStyleSheets": ["${projectDir.toString()}/static/logo-styles.css"],
"customAssets" : ["${projectDir.toString()}/static/logo-icon.svg", "${projectDir.toString()}/static/glide_circle_logo.png"]
}"""
]
)
}
}
subprojects { project ->
repositories {
google()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
gradlePluginPortal()
}
// Exclude packages not intended for public use.
if ([
"testutil",
"flickr",
"giphy",
"imgur",
"svg",
"gallery",
"contacturi",
"test",
"gif_decoder",
"gifencoder",
"compiler",
"benchmark",
"integrationtest",
"instrumentation",
"glide-parent",
"integration",
"samples",
"third_party"
].contains(project.getName())) {
afterEvaluate {
project.apply plugin: 'org.jetbrains.dokka'
project.tasks.dokkaHtmlPartial.enabled = false
}
} else {
afterEvaluate {
project.apply plugin: 'org.jetbrains.dokka'
project.tasks.dokkaHtmlPartial.configure {
dokkaSourceSets {
// Kotlin works out of the box
if (!project.plugins.hasPlugin("kotlin-android") && project.plugins.hasPlugin("com.android.library")) {
// Java Android modules
register("main") {
sourceRoots.from(project.android.sourceSets.main.java.srcDirs)
}
} else if (project.plugins.hasPlugin("java") && "ksp" != project.getName()) {
// Java only modules (ksp is not useful and uses multiple plugins)
register("main") {
sourceRoots.from(sourceSets.main.java.srcDirs)
}
}
}
}
}
}
afterEvaluate {
if (project.plugins.hasPlugin("com.android.application")) {
project.dependencies {
// Hack around some version mismatches: https://stackoverflow.com/questions/75263047/duplicate-class-in-kotlin-android
implementation(platform(libs.kotlin.bom))
}
}
}
tasks.withType(JavaCompile) {
// 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.addAll([
//Treat all warnings as errors.
"-Werror",
//Enable all warnings.
"-Xlint:all",
// Disable warnings about source 7 being obsolete.
"-Xlint:-options",
// 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",
])
}
}
tasks.withType(Test) {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
}
}
// Avoid issues like #2452.
tasks.withType(Jar) {
duplicatesStrategy = DuplicatesStrategy.FAIL
}
apply plugin: 'checkstyle'
checkstyle {
toolVersion = '8.45.1'
}
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 = [
["PMD", dir, ".*/pmd/.*\\.xml\$", "PMD"],
["ANDROIDLINT", dir, ".*/lint-results\\.xml\$", "AndroidLint"],
["CHECKSTYLE", dir, ".*/checkstyle/.*\\.xml\$", "Checkstyle"],
]
}
afterEvaluate {
if (project.hasProperty("android")
&& project.name != 'pmd' ) {
android {
lint {
warningsAsErrors true
quiet true
// Caught by the violations plugin.
abortOnError false
}
// We don't need a BuildConfig constants class.
buildFeatures {
buildConfig = false
}
// Signing isn't relevant to a library. Our signing is done via
// a GPG key at upload time, there's no APK to sign.
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}
}
if (project.tasks.findByName('check')) {
check.dependsOn('checkstyle')
check.finalizedBy violations
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。