Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 0 additions & 97 deletions annotation/compiler/test/build.gradle

This file was deleted.

90 changes: 90 additions & 0 deletions annotation/compiler/test/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
plugins {
id("com.android.library")
}

android {
namespace = "com.bumptech.glide.annotation.compiler.test"
compileSdkVersion = libs.versions.compile.sdk.version.get()

defaultConfig {
minSdk = libs.versions.min.sdk.version.get().toInt()
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

testOptions {
unitTests.all { testTask ->
testTask.maxParallelForks = 2
}
}

sourceSets {
getByName("test") {
resources {
// *.java is excluded by default...
setExcludes(emptyList())
}
// TODO: Re-enable these tests after fixing import orders.
java {
exclude("**/AppGlideModuleWithExcludesTest.java")
exclude("**/AppGlideModuleWithLibraryInPackageTest.java")
exclude("**/AppGlideModuleWithMultipleExcludesTest.java")
exclude("**/EmptyAppAndLibraryGlideModulesTest.java")
exclude("**/GlideExtensionWithOptionTest.java")
exclude("**/GlideExtensionWithTypeTest.java")
exclude("**/GlideExtensionWithTypeTest.java")
}
}
}
}

// This special test only submodule exists because adding the :glide dependency seems to break
// the annotation processor dependency chain for the internal sample apps. It's also somewhat
// easier to parse as a separate module given the existing complexity here and in the compiler
// build.gradle file.
dependencies {
testImplementation(project(":glide"))
testImplementation(project(":annotation:compiler"))
testImplementation(libs.junit)
testImplementation(libs.javapoet)
testImplementation(libs.findbugs.jsr305)
// Using 0.10 of compile-testing is required for Android Studio to function, but not for the
// gradle build. Not yet clear why, but it looks like some kind of version conflict between
// javapoet, guava and/or truth.
//noinspection GradleDependency
testImplementation("com.google.testing.compile:compile-testing:0.10") {
// We don't use this and including it requires us to list it separatel which would be
// confusing.
exclude(group = "com.google.auto.value", module = "auto-value")
}
testImplementation(libs.androidx.annotation)
testImplementation(libs.androidx.fragment)
// TODO: Find some way to include a similar dependency on java 9+ and re-enable these tests in gradle.
// testImplementation files(Jvm.current().getJre().homeDir.getAbsolutePath()+'/lib/rt.jar')

testAnnotationProcessor(project(":annotation:compiler"))
testAnnotationProcessor(libs.autoservice)
}

tasks.register("regenerateTestResources") {
group = "Verification"
description = "Regenerates all test resource files under annotation/compiler/test/src/test/resources that are compared against the current output to detect regressions"
tasks.withType<Test> {
systemProperties["com.bumptech.glide.annotation.compiler.test.regenerate.path"] = projectDir
}
doFirst {
println("Regenerating test resources....")
}
doLast {
println("Finished regenerating test resources")
}
}

afterEvaluate {
tasks.named("lint").configure { enabled = false }
tasks.named("compileReleaseJavaWithJavac").configure { enabled = false }
tasks.named("regenerateTestResources") { finalizedBy("testReleaseUnitTest") }
}
103 changes: 0 additions & 103 deletions library/build.gradle

This file was deleted.

Loading
Loading