Skip to content

Commit

Permalink
Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-budiyev committed Oct 8, 2018
1 parent 597cf2d commit 81e78cb
Show file tree
Hide file tree
Showing 59 changed files with 150 additions and 130 deletions.
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
}

Expand Down Expand Up @@ -40,11 +40,11 @@ ext {
}

android {
compileSdkVersion 27
compileSdkVersion 28

defaultConfig {
minSdkVersion 14
targetSdkVersion 27
targetSdkVersion 28
versionCode 87
versionName libraryVersion
}
Expand All @@ -62,8 +62,8 @@ android {
}

dependencies {
api 'com.android.support:support-annotations:27.1.1'
api 'com.android.support:exifinterface:27.1.1'
api 'androidx.annotation:annotation:1.0.0'
api 'androidx.exifinterface:exifinterface:1.0.0'
}

group = publishedGroupId
Expand Down
20 changes: 3 additions & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.java.home=
org.gradle.jvmargs=-Xmx2048m
android.useAndroidX=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jul 03 12:25:58 MSK 2017
#Thu Sep 13 13:30:38 MSK 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
import java.util.concurrent.ExecutorService;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

final class AsyncLoadImageAction<T> extends LoadImageAction<T> {
public AsyncLoadImageAction(@NonNull final DataDescriptor<T> descriptor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package com.budiyev.android.imageloader;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

abstract class BaseDataDescriptor<T> implements DataDescriptor<T> {
private final T mData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
package com.budiyev.android.imageloader;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.WorkerThread;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;

public interface BitmapLoader<T> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
package com.budiyev.android.imageloader;

import android.graphics.Bitmap;
import android.support.annotation.AnyThread;
import android.support.annotation.NonNull;
import android.support.annotation.WorkerThread;

import androidx.annotation.AnyThread;
import androidx.annotation.NonNull;
import androidx.annotation.WorkerThread;

/**
* Bitmap processor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
import java.util.List;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;

import androidx.annotation.NonNull;

final class BitmapTransformationGroup implements BitmapTransformation {
private final List<BitmapTransformation> mTransformations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

final class ByteArrayBitmapLoader implements BitmapLoader<byte[]> {
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package com.budiyev.android.imageloader;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

final class ByteArrayDataDescriptor extends UnidentifiableDataDescriptor<byte[]> {
public ByteArrayDataDescriptor(@NonNull final byte[] data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package com.budiyev.android.imageloader;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

final class ByteArrayDataDescriptorFactory implements DataDescriptorFactory<byte[]> {
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.io.OutputStream;
import java.util.Arrays;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

final class ByteBuffer extends OutputStream {
private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
import java.lang.ref.WeakReference;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;

import androidx.annotation.NonNull;

final class CacheImageAction extends ImageRequestAction {
private final String mKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
package com.budiyev.android.imageloader;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;

import androidx.annotation.NonNull;

public enum CompressMode {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/
package com.budiyev.android.imageloader;

import android.support.annotation.AnyThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.AnyThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* Data descriptor, provides data and key that identifies this data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package com.budiyev.android.imageloader;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

/**
* Data descriptor factory
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/budiyev/android/imageloader/DataUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.WorkerThread;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;

@SuppressWarnings("SameParameterValue")
public final class DataUtils {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
package com.budiyev.android.imageloader;

import android.graphics.Bitmap;
import android.support.annotation.MainThread;
import android.support.annotation.NonNull;
import android.view.View;

import androidx.annotation.MainThread;
import androidx.annotation.NonNull;

/**
* Display callback
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Handler;
import android.support.annotation.MainThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

final class DisplayImageAction<T> extends LoadImageAction<T> {
private final WeakReference<Resources> mResources;
private final WeakReference<View> mView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
package com.budiyev.android.imageloader;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import android.support.annotation.WorkerThread;

import androidx.annotation.NonNull;
import androidx.annotation.WorkerThread;

/**
* Error callback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
import android.graphics.drawable.LayerDrawable;
import android.os.Build;
import android.os.SystemClock;
import android.support.annotation.NonNull;
import android.support.annotation.RequiresApi;

import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

@RequiresApi(Build.VERSION_CODES.KITKAT)
final class FadeDrawable extends LayerDrawable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

final class FileBitmapLoader implements BitmapLoader<File> {
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.io.File;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

final class FileDataDescriptor extends IdentifiableDataDescriptor<File> {
public FileDataDescriptor(@NonNull final File data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.io.File;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

final class FileDataDescriptorFactory implements DataDescriptorFactory<File> {
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

final class FileDescriptorBitmapLoader implements BitmapLoader<FileDescriptor> {
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.io.FileDescriptor;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

final class FileDescriptorDataDescriptor extends UnidentifiableDataDescriptor<FileDescriptor> {
public FileDescriptorDataDescriptor(@NonNull final FileDescriptor data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.io.FileDescriptor;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

final class FileDescriptorDataDescriptorFactory implements DataDescriptorFactory<FileDescriptor> {
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package com.budiyev.android.imageloader;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

abstract class IdentifiableDataDescriptor<T> extends BaseDataDescriptor<T> {
private final String mKey;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/budiyev/android/imageloader/ImageCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
package com.budiyev.android.imageloader;

import android.graphics.Bitmap;
import android.support.annotation.AnyThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.AnyThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* Common image cache interface, implementations should be thread safe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
import android.content.Context;
import android.net.Uri;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* Image loader is a universal tool for loading bitmaps efficiently in Android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@

import android.content.Context;
import android.net.Uri;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* Image loader builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

final class ImageLoaderExecutor extends ThreadPoolExecutor {
public ImageLoaderExecutor(final int poolSize) {
Expand Down
Loading

0 comments on commit 81e78cb

Please sign in to comment.