Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
1hakr committed Jan 7, 2020
1 parent 2f67ec2 commit fecf45a
Show file tree
Hide file tree
Showing 34 changed files with 92 additions and 82 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha08'
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
allprojects {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
android.enableJetifier=true
android.useAndroidX=true
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 @@
#Thu May 03 19:49:22 AEST 2018
#Mon Jan 06 17:16:00 AEDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
5 changes: 4 additions & 1 deletion library/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
android:versionCode="1"
android:versionName="1.0" >

<application />
<application android:usesCleartextTraffic="true">
<uses-library android:name="org.apache.http.legacy"
android:required="false"/>
</application>

</manifest>
11 changes: 5 additions & 6 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha16'
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
}
}
Expand All @@ -19,14 +19,13 @@ apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'

dependencies {
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.appcompat:appcompat:1.1.0'
}

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 28
buildToolsVersion '28.0.3'
useLibrary 'org.apache.http.legacy'
sourceSets {
main {
Expand Down
3 changes: 2 additions & 1 deletion library/src/com/android/volley/AsyncRequestLoader.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.android.volley;

import android.content.Context;
import android.support.v4.content.AsyncTaskLoader;

import com.android.volley.error.VolleyError;
import com.android.volley.request.GsonRequest;
Expand All @@ -10,6 +9,8 @@

import org.apache.http.HttpStatus;

import androidx.loader.content.AsyncTaskLoader;


/**
* Created by HaKr on 12/08/15.
Expand Down
6 changes: 2 additions & 4 deletions library/src/com/android/volley/Volley.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.http.AndroidHttpClient;
import android.support.v4.content.ContextCompat;
import android.support.v4.util.ArrayMap;
import android.text.TextUtils;
import android.widget.ImageView;

Expand All @@ -23,9 +21,9 @@

import java.io.File;
import java.util.ArrayList;
import java.util.Map;

import static com.android.volley.toolbox.HttpHeaderParser.parseDateAsEpoch;
import androidx.collection.ArrayMap;
import androidx.core.content.ContextCompat;

/**
* Created by HaKr on 13/05/17.
Expand Down
9 changes: 5 additions & 4 deletions library/src/com/android/volley/cache/BitmapCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.util.LruCache;

import com.android.volley.VolleyLog;
import com.android.volley.misc.Utils;
import com.android.volley.toolbox.ImageCache;

import androidx.collection.LruCache;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

/**
* This class holds our bitmap caches (memory and disk).
*/
Expand All @@ -41,7 +42,7 @@ public class BitmapCache implements ImageCache {

/**
* Don't instantiate this class directly, use
* {@link #getInstance(android.support.v4.app.FragmentManager, float)}.
* {@link #getInstance(FragmentManager, float)}.
* @param memCacheSize Memory cache size in KB.
*/
private BitmapCache(int memCacheSize) {
Expand Down
13 changes: 7 additions & 6 deletions library/src/com/android/volley/cache/BitmapImageCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,23 @@

package com.android.volley.cache;

import java.io.File;

import android.annotation.TargetApi;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.os.StatFs;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.util.LruCache;

import com.android.volley.VolleyLog;
import com.android.volley.cache.DiskLruBasedCache.ImageCacheParams;
import com.android.volley.misc.Utils;
import com.android.volley.toolbox.ImageCache;

import java.io.File;

import androidx.collection.LruCache;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

/**
* This class holds our bitmap caches (memory and disk).
*/
Expand All @@ -45,7 +46,7 @@ public class BitmapImageCache implements ImageCache {

/**
* Don't instantiate this class directly, use
* {@link #getInstance(android.support.v4.app.FragmentManager, float)}.
* {@link #getInstance(FragmentManager, float)}.
* @param memCacheSize Memory cache size in KB.
*/
public BitmapImageCache(int memCacheSize) {
Expand Down
3 changes: 2 additions & 1 deletion library/src/com/android/volley/cache/LruImageCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.os.Build;
import android.support.v4.util.LruCache;

import com.android.volley.toolbox.ImageCache;
import com.android.volley.toolbox.ImageLoader;

import androidx.collection.LruCache;


/**
* Basic implementation of a Bitmap LRU cache to use
Expand Down
3 changes: 2 additions & 1 deletion library/src/com/android/volley/cache/SimpleImageLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import android.graphics.drawable.TransitionDrawable;
import android.net.http.AndroidHttpClient;
import android.os.Build;
import android.support.v4.app.FragmentActivity;
import android.widget.ImageView;

import com.android.volley.Cache;
Expand All @@ -47,6 +46,8 @@

import java.util.ArrayList;

import androidx.fragment.app.FragmentActivity;

/**
* A class that wraps up remote image loading requests using the Volley library combined with a
* memory cache. An single instance of this class should be created once when your Activity or
Expand Down
14 changes: 7 additions & 7 deletions library/src/com/android/volley/misc/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@

package com.android.volley.misc;

import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.io.StringWriter;
import java.nio.charset.Charset;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.ContentResolver;
Expand All @@ -37,6 +30,13 @@
import org.apache.http.Header;
import org.apache.http.HttpResponse;

import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.io.StringWriter;
import java.nio.charset.Charset;

/**
* Class containing some static utility methods.
*/
Expand Down
3 changes: 2 additions & 1 deletion library/src/com/android/volley/toolbox/ImageLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import android.graphics.Bitmap.Config;
import android.os.Handler;
import android.os.Looper;
import android.support.v4.util.ArrayMap;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;

Expand All @@ -38,6 +37,8 @@

import java.util.LinkedList;

import androidx.collection.ArrayMap;

/**
* Helper that handles loading and caching images from remote URLs.
*
Expand Down
8 changes: 4 additions & 4 deletions library/src/com/android/volley/ui/PhotoView.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@
import android.graphics.RectF;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v4.view.ScaleGestureDetectorCompat;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.FloatMath;
import android.view.GestureDetector.OnDoubleTapListener;
import android.view.GestureDetector.OnGestureListener;
import android.view.ViewGroup.LayoutParams;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.ViewConfiguration;
import android.view.ViewGroup.LayoutParams;

import com.android.volley.R;
import com.android.volley.error.VolleyError;
import com.android.volley.misc.Utils.HorizontallyScrollable;
import com.android.volley.toolbox.ImageLoader.ImageContainer;
import com.android.volley.toolbox.ImageLoader.ImageListener;

import androidx.core.view.GestureDetectorCompat;
import androidx.core.view.ScaleGestureDetectorCompat;

/**
* Layout for the photo list view header.
*/
Expand Down
11 changes: 6 additions & 5 deletions sample/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.volley.demo"
android:versionCode="3"
android:versionName="1.1" >

<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand All @@ -17,7 +14,11 @@
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-6407484780907805~3972270474"/>
<activity
android:name="com.volley.demo.MainActivity"
android:label="@string/app_name" >
Expand Down
14 changes: 7 additions & 7 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha08'
classpath 'com.android.tools.build:gradle:3.5.3'
}
}

apply plugin: 'com.android.application'

dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.google.android.gms:play-services-ads:15.0.1'
compile project(':library')
implementation fileTree(include: '*.jar', dir: 'libs')
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.gms:play-services-ads:18.3.0'
implementation project(':library')
}


android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 29
useLibrary 'org.apache.http.legacy'
sourceSets {
main {
Expand Down
3 changes: 1 addition & 2 deletions sample/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@android:color/white"
android:choiceMode="singleChoice"
android:drawSelectorOnTop="true"
android:focusable="false"
android:focusable="true"
android:gravity="center"
android:paddingLeft="10dp"
android:paddingRight="10dp"
Expand Down
4 changes: 2 additions & 2 deletions sample/res/layout/image_detail_pager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
limitations under the License.
-->

<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.viewpager.widget.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

</android.support.v4.view.ViewPager>
</androidx.viewpager.widget.ViewPager>
2 changes: 1 addition & 1 deletion sample/src/com/volley/demo/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;

Expand Down
4 changes: 2 additions & 2 deletions sample/src/com/volley/demo/ExampleCookies.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.apache.http.impl.cookie.BasicClientCookie;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
Expand All @@ -34,10 +34,10 @@
import com.android.volley.Request.Method;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.Volley;
import com.android.volley.error.VolleyError;
import com.android.volley.request.StringRequest;
import com.android.volley.toolbox.HttpClientStack;
import com.android.volley.toolbox.Volley;


/**
Expand Down
2 changes: 1 addition & 1 deletion sample/src/com/volley/demo/ExampleGsonRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.volley.demo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
Expand Down
Loading

0 comments on commit fecf45a

Please sign in to comment.