Skip to content

Commit

Permalink
Remove Glide's spotless integration.
Browse files Browse the repository at this point in the history
It's causing spurious failures that can't be fixed. We can rely on internal formatting tools for now.

PiperOrigin-RevId: 429667832
  • Loading branch information
sjudd authored and glide-copybara-robot committed Feb 19, 2022
1 parent a607b1d commit edf9d32
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 36 deletions.
18 changes: 0 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ buildscript {
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:5.11.0"
classpath "androidx.benchmark:benchmark-gradle-plugin:${ANDROID_X_BENCHMARK_VERSION}"
}
}
Expand Down Expand Up @@ -93,23 +92,6 @@ subprojects { project ->
duplicatesStrategy = DuplicatesStrategy.FAIL
}

def isDisallowedProject =
project.name in ["third_party", "gif_decoder", "gif_encoder", "disklrucache", "glide"]
if (!isDisallowedProject) {
apply plugin: "com.diffplug.spotless"

spotless {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/resources/**'
exclude '**/build/**'
}
googleJavaFormat()
}
}
}

apply plugin: 'checkstyle'

checkstyle {
Expand Down
4 changes: 3 additions & 1 deletion library/src/main/java/com/bumptech/glide/Glide.java
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ public ArrayPool getArrayPool() {
return arrayPool;
}

/** @return The context associated with this instance. */
/**
* @return The context associated with this instance.
*/
@NonNull
public Context getContext() {
return glideContext.getBaseContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public static DiskCache create(File directory, long maxSize) {
return new DiskLruCacheWrapper(directory, maxSize);
}

/** @deprecated Do not extend this class. */
/**
* @deprecated Do not extend this class.
*/
@Deprecated
// Deprecated public API.
@SuppressWarnings({"WeakerAccess", "DeprecatedIsStillUsed"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ public static GlideExecutor newDiskCacheExecutor(
return newDiskCacheBuilder().setUncaughtThrowableStrategy(uncaughtThrowableStrategy).build();
}

/** @deprecated Use {@link #newDiskCacheBuilder()} instead. */
/**
* @deprecated Use {@link #newDiskCacheBuilder()} instead.
*/
// Public API.
@SuppressWarnings("WeakerAccess")
@Deprecated
Expand Down Expand Up @@ -127,7 +129,9 @@ public static GlideExecutor newSourceExecutor() {
return newSourceBuilder().build();
}

/** @deprecated Use {@link #newSourceBuilder()} instead. */
/**
* @deprecated Use {@link #newSourceBuilder()} instead.
*/
// Public API.
@SuppressWarnings("unused")
@Deprecated
Expand All @@ -136,7 +140,9 @@ public static GlideExecutor newSourceExecutor(
return newSourceBuilder().setUncaughtThrowableStrategy(uncaughtThrowableStrategy).build();
}

/** @deprecated Use {@link #newSourceBuilder()} instead. */
/**
* @deprecated Use {@link #newSourceBuilder()} instead.
*/
// Public API.
@SuppressWarnings("WeakerAccess")
@Deprecated
Expand Down Expand Up @@ -202,7 +208,9 @@ public static GlideExecutor newAnimationExecutor() {
return newAnimationBuilder().build();
}

/** @deprecated Use {@link #newAnimationBuilder()} instead. */
/**
* @deprecated Use {@link #newAnimationBuilder()} instead.
*/
// Public API.
@SuppressWarnings("WeakerAccess")
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public static <T> UnitModelLoader<T> getInstance() {
return (UnitModelLoader<T>) INSTANCE;
}

/** @deprecated Use {@link #getInstance()} instead. */
/**
* @deprecated Use {@link #getInstance()} instead.
*/
// Need constructor to document deprecation, will be removed, when constructor is privatized.
@SuppressWarnings({"PMD.UnnecessaryConstructor", "DeprecatedIsStillUsed"})
@Deprecated
Expand Down Expand Up @@ -95,7 +97,9 @@ public static <T> Factory<T> getInstance() {
return (Factory<T>) FACTORY;
}

/** @deprecated Use {@link #getInstance()} instead. */
/**
* @deprecated Use {@link #getInstance()} instead.
*/
// Need constructor to document deprecation, will be removed, when constructor is privatized.
@SuppressWarnings("PMD.UnnecessaryConstructor")
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public BitmapEncoder(@NonNull ArrayPool arrayPool) {
this.arrayPool = arrayPool;
}

/** @deprecated Use {@link #BitmapEncoder(ArrayPool)} instead. */
/**
* @deprecated Use {@link #BitmapEncoder(ArrayPool)} instead.
*/
@Deprecated
public BitmapEncoder() {
arrayPool = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public BitmapDrawableTranscoder(@NonNull Context context) {
this(context.getResources());
}

/** @deprecated Use {@link #BitmapDrawableTranscoder(Resources)}, {@code bitmapPool} is unused. */
/**
* @deprecated Use {@link #BitmapDrawableTranscoder(Resources)}, {@code bitmapPool} is unused.
*/
@Deprecated
public BitmapDrawableTranscoder(
@NonNull Resources resources, @SuppressWarnings("unused") BitmapPool bitmapPool) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public BitmapImageViewTarget(ImageView view) {
super(view);
}

/** @deprecated Use {@link #waitForLayout()} instead. */
/**
* @deprecated Use {@link #waitForLayout()} instead.
*/
// Public API.
@SuppressWarnings({"unused", "deprecation"})
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public BitmapThumbnailImageViewTarget(ImageView view) {
super(view);
}

/** @deprecated Use {@link #waitForLayout()} instead. */
/**
* @deprecated Use {@link #waitForLayout()} instead.
*/
@SuppressWarnings("deprecation")
@Deprecated
public BitmapThumbnailImageViewTarget(ImageView view, boolean waitForLayout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ public DrawableImageViewTarget(ImageView view) {
super(view);
}

/** @deprecated Use {@link #waitForLayout()} instead. */
/**
* @deprecated Use {@link #waitForLayout()} instead.
*/
// Public API.
@SuppressWarnings({"unused", "deprecation"})
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public DrawableThumbnailImageViewTarget(ImageView view) {
super(view);
}

/** @deprecated Use {@link #waitForLayout()} instead. */
/**
* @deprecated Use {@link #waitForLayout()} instead.
*/
@Deprecated
@SuppressWarnings("deprecation")
public DrawableThumbnailImageViewTarget(ImageView view, boolean waitForLayout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public ImageViewTarget(ImageView view) {
super(view);
}

/** @deprecated Use {@link #waitForLayout()} instead. */
/**
* @deprecated Use {@link #waitForLayout()} instead.
*/
@SuppressWarnings({"deprecation"})
@Deprecated
public ImageViewTarget(ImageView view, boolean waitForLayout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public ThumbnailImageViewTarget(ImageView view) {
super(view);
}

/** @deprecated Use {@link #waitForLayout()} insetad. */
/**
* @deprecated Use {@link #waitForLayout()} insetad.
*/
@Deprecated
@SuppressWarnings({"deprecation"})
public ThumbnailImageViewTarget(ImageView view, boolean waitForLayout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public Builder() {
this(DEFAULT_DURATION_MS);
}

/** @param durationMillis The duration of the cross fade animation in milliseconds. */
/**
* @param durationMillis The duration of the cross fade animation in milliseconds.
*/
public Builder(int durationMillis) {
this.durationMillis = durationMillis;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public static GlideExecutor newMainThreadExecutor() {
return newTestExecutor(new DirectExecutorService());
}

/** @deprecated Use {@link #newMainThreadExecutor} instead. */
/**
* @deprecated Use {@link #newMainThreadExecutor} instead.
*/
@Deprecated
public static GlideExecutor newMainThreadUnlimitedExecutor() {
return newMainThreadExecutor();
Expand Down

0 comments on commit edf9d32

Please sign in to comment.