Selaa lähdekoodia

整理没有用到的依赖库

zengjiebin 8 vuotta sitten
vanhempi
commit
aece70e212

+ 7 - 22
app/build.gradle

@@ -123,16 +123,13 @@ dependencies {
     //    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
     //        exclude group: 'com.android.support', module: 'support-annotations'
     //    })
-    compile 'com.android.support:appcompat-v7:27.0.2'
-    compile 'com.android.support:support-v4:27.0.2'
     compile 'com.android.support:design:27.0.2'
     compile 'com.android.support.constraint:constraint-layout:1.0.2'
     testCompile 'junit:junit:4.12'
     //    compile 'com.shark:screencapture:1.0.0'
-    compile 'com.google.code.gson:gson:2.7'
+    compile 'com.google.code.gson:gson:2.8.2'
     compile 'com.jcodecraeer:xrecyclerview:1.5.2'
-    compile 'com.github.bumptech.glide:glide:3.7.0'
-    compile 'com.squareup.okhttp3:okhttp:3.9.1'
+    compile 'com.squareup.okhttp3:okhttp:3.10.0'
     compile 'org.greenrobot:eventbus:3.1.1'
     compile 'com.zhy:base-adapter:3.0.3'
     compile 'com.liulishuo.filedownloader:library:1.6.9'
@@ -148,7 +145,8 @@ dependencies {
     compile 'com.mylhyl:acp:1.1.7'
     compile 'cn.yipianfengye.android:zxing-library:2.2'
     compile 'com.github.huburt-Hu:NewbieGuide:v1.2.0'
-    compile 'com.android.support:multidex:1.0.1'
+    debugCompile 'com.android.support:multidex:1.0.1'
+    releaseCompile 'com.android.support:multidex:1.0.3'
     compile(name: 'com.kfzs.safe', ext: 'aar')
 
     //butterknife
@@ -183,8 +181,6 @@ dependencies {
     compile 'com.alibaba:fastjson:+'
 
     //添加半袋米相关
-//    compile 'com.jakewharton:butterknife:8.1.0'
-//    annotationProcessor 'com.jakewharton:butterknife-compiler:8.1.0'
     compile(name: 'appstoreutils', ext: 'aar')
     compile project(':view')
 //    compile(name: 'view-release', ext: 'aar')
@@ -194,17 +190,12 @@ dependencies {
     // 此处以JPush 3.0.3 版本为例。
     compile 'cn.jiguang.sdk:jcore:1.1.6'
     // 此处以JCore 1.1.1 版本为例。
-    compile 'com.google.code.gson:gson:2.8.1'
 
-    //    compile 'com.android.support:design:24.2.0'
     compile 'com.flipboard:bottomsheet-core:1.5.3'
     compile 'com.flipboard:bottomsheet-commons:1.5.3'
-    //    compile 'org.greenrobot:greendao:3.2.0'
     compile 'com.google.protobuf:protobuf-java:3.2.0'
     compile 'com.umeng.analytics:analytics:6.0.9'
-    compile(name: 'com.kfzs.safe', ext: 'aar')
     compile(name: 'FileDownloader-1.0.0', ext: 'aar')
-    compile 'org.greenrobot:eventbus:3.0.0'
     compile 'com.yalantis:ucrop:2.2.0'
     //    compile files('libs/SocialSDK_QQ_Simplify.jar')
 
@@ -229,20 +220,14 @@ dependencies {
 
     compile 'com.zhy:okhttputils:2.6.2'
     compile files('libs/alipaySdk-20170922.jar')
-    compile 'com.github.bumptech.glide:glide:3.5.2'
-    compile 'jp.wasabeef:glide-transformations:2.0.2'
-    compile 'com.nineoldandroids:library:2.4.0'
-    compile 'cn.bingoogolapple:bga-banner:2.1.7@aar'
     compile 'mdl.sinlov.android:log:0.0.2'
     //    compile 'com.kf.framework:kf-utils:latest.integration@aar'
     compile 'com.kf.framework:kf-utils:1.4.5@aar'
     //    compile 'com.kf.framework:volleyplus:latest.integration@aar'
     compile 'com.kf.framework:volleyplus:1.4.5@aar'
-    compile 'com.android.support:support-annotations:23.1.1'
-    compile 'com.android.support:recyclerview-v7:27.1.0'
-    compile 'io.reactivex:rxandroid:1.2.1'
-    compile 'io.reactivex:rxjava:1.1.6'
-    compile 'top.zibin:Luban:1.0.9'
+    compile 'com.android.support:support-annotations:27.0.2'
+    compile 'com.android.support:recyclerview-v7:27.0.2'
+//    compile 'top.zibin:Luban:1.0.9'
     compile project(':datashare')
     compile files('libs/jackson-core-2.2.1.jar')
     compile files('libs/jackson-dataformat-xml-2.1.2.jar')

+ 4 - 0
app/src/main/AndroidManifest.xml

@@ -174,6 +174,10 @@
             android:name=".page.SplashActivity"
             android:screenOrientation="portrait">
 
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
         </activity>
         <activity
             android:name="com.sheep.gamegroup.view.activity.AskRewardAct"

+ 4 - 9
app/src/main/java/com/kfzs/duanduan/react/TabsHelper.java

@@ -22,9 +22,9 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
-import rx.Observable;
-import rx.android.schedulers.AndroidSchedulers;
-import rx.functions.Action1;
+import io.reactivex.Observable;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.functions.Consumer;
 
 /**
  * Created by realicing on 2017/11/24.
@@ -176,12 +176,7 @@ public class TabsHelper {
             presscount = presscount + 1;
             Observable.just(1).delay(period * presscount, TimeUnit.MILLISECONDS)
                     .observeOn(AndroidSchedulers.mainThread())
-                    .subscribe(new Action1<Integer>() {
-                        @Override
-                        public void call(Integer integer) {
-                            doBackPress();
-                        }
-                    });
+                    .subscribe(integer -> doBackPress());
         } else {
             presscount = 0;
             doBackPress();

+ 0 - 88
app/src/main/java/com/kfzs/duanduan/react/YouHuiWanPopUtil.java

@@ -1,88 +0,0 @@
-package com.kfzs.duanduan.react;
-
-import android.app.Activity;
-import android.content.Context;
-import android.graphics.Color;
-import android.graphics.drawable.ColorDrawable;
-import android.support.v4.app.FragmentTabHost;
-import android.support.v4.view.ViewPager;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.PopupWindow;
-
-import com.kfzs.duanduan.ActMain;
-import com.sheep.jiuyan.samllsheep.R;
-
-import java.util.concurrent.TimeUnit;
-
-import rx.Observable;
-import rx.android.schedulers.AndroidSchedulers;
-import rx.functions.Action1;
-import rx.schedulers.Schedulers;
-
-/**
- * Created by Administrator on 2017/11/21.
- */
-
-public class YouHuiWanPopUtil {
-
-    public static void showPop(final ActMain actMain, final ViewPager view_pager_container) {
-        if (isFirstRunApp()) {
-            Observable.just(2).delay(2, TimeUnit.SECONDS)
-//                    .subscribeOn(Schedulers.io())
-                    .observeOn(AndroidSchedulers.mainThread())
-                    .subscribe(new Action1<Integer>() {
-                        @Override
-                        public void call(Integer index) {
-                            view_pager_container.setCurrentItem(index);
-                            new YouHuiWanPop(actMain).show(view_pager_container);
-                        }
-                    }, new Action1<Throwable>() {
-                        @Override
-                        public void call(Throwable throwable) {
-                        }
-                    });
-        }
-    }
-
-    /**
-     * 第一次启动app
-     *
-     * @return
-     */
-    public static boolean isFirstRunApp() {
-        boolean isFirstRunApp = SharedPreferences.getInstance().getBoolean(SharedPreferences.KEY_IS_FIRST_RUN_APP, true);
-        if (isFirstRunApp)
-            SharedPreferences.getInstance().putBoolean(SharedPreferences.KEY_IS_FIRST_RUN_APP, false);
-        return isFirstRunApp;
-    }
-
-    private static class YouHuiWanPop {
-        private PopupWindow pop;
-
-        public YouHuiWanPop(ActMain actMain) {
-            init(actMain);
-        }
-
-        private void init(Activity activity) {
-            LayoutInflater inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-            View popShareView = inflater.inflate(R.layout.popupwindow_you_hui_wan, null);
-            pop = new PopupWindow(popShareView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
-            pop.setFocusable(true);
-            pop.setOutsideTouchable(true);
-            pop.setBackgroundDrawable(new ColorDrawable(Color.argb(0x80, 0x00, 0x00, 0x00)));
-            popShareView.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
-                    pop.dismiss();
-                }
-            });
-        }
-
-        private void show(View view) {
-            pop.showAtLocation(view, Gravity.CENTER, 0, 0);
-        }
-    }
-}

+ 0 - 104
app/src/main/java/com/kfzs/duanduan/react/upfile/UpFileUtils.java

@@ -1,104 +0,0 @@
-package com.kfzs.duanduan.react.upfile;
-
-import android.app.Activity;
-import android.widget.Toast;
-
-import com.zhy.http.okhttp.OkHttpUtils;
-import com.zhy.http.okhttp.callback.Callback;
-
-import java.io.File;
-
-import okhttp3.Call;
-import okhttp3.Response;
-import top.zibin.luban.Luban;
-import top.zibin.luban.OnCompressListener;
-
-/**
- * Created by howie on 2017/5/11.
- */
-
-public class UpFileUtils {
-    private Activity mActivity;
-    private String COMPRESS_FILE_ERROR = "压缩图片失败";
-    private String FILE_NOT_EXISTS = "文件不存在";
-    private String URL_IS_EMPTY = "请求地址为空";
-    private String URL_RN_UP_IMAGE;
-
-    public UpFileUtils(Activity mActivity, String url) {
-        this.mActivity = mActivity;
-        this.URL_RN_UP_IMAGE = url;
-    }
-
-
-    //压缩图片
-    public void compressImageByLuBan(File file, final UpFileListener upFileListener) {
-        if (upFileListener != null) {
-            if (!file.exists()) {
-                upFileListener.Failure(FILE_NOT_EXISTS);
-                return;
-            }
-            if (URL_RN_UP_IMAGE.isEmpty()) {
-                upFileListener.Failure(URL_IS_EMPTY);
-                return;
-            }
-            Luban.get(mActivity)
-                    .load(file)                     //传人要压缩的图片
-                    .putGear(Luban.THIRD_GEAR)      //设定压缩档次,默认三挡
-                    .setCompressListener(new OnCompressListener() {
-
-                        @Override
-                        public void onStart() {
-                            // TODO 压缩开始前调用,可以在方法内启动 loading UI
-                        }
-
-                        @Override
-                        public void onSuccess(File file) {
-                            if (file != null) {
-                                upImage(file, upFileListener);
-                            } else {
-                                Toast.makeText(mActivity, COMPRESS_FILE_ERROR, Toast.LENGTH_SHORT).show();
-                            }
-                        }
-
-                        @Override
-                        public void onError(Throwable e) {
-                            Toast.makeText(mActivity, COMPRESS_FILE_ERROR, Toast.LENGTH_SHORT).show();
-
-                        }
-                    }).launch();
-
-        }
-    }
-
-    //上传图片
-    private void upImage(File compressImageSuccess, final UpFileListener upFileListener) {
-        OkHttpUtils.post()//
-                .addFile("asset_name", "1.png", compressImageSuccess)//
-                .url(URL_RN_UP_IMAGE)
-                .build()//
-                .execute(new Callback() {
-                    @Override
-                    public void inProgress(float progress, long total, int id) {
-                        super.inProgress(progress, total, id);
-                        upFileListener.Progress(String.valueOf(Math.round(progress * 100)));
-                    }
-
-                    @Override
-                    public Object parseNetworkResponse(Response response, int id) throws Exception {
-                        return response.body().string();
-                    }
-
-                    @Override
-                    public void onError(Call call, Exception e, int id) {
-                        upFileListener.Failure(e.toString());
-                    }
-
-                    @Override
-                    public void onResponse(Object response, int id) {
-                        upFileListener.Success(response.toString());
-                    }
-                });
-
-    }
-
-}

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/util/ConnectAddress.java

@@ -6,8 +6,8 @@ package com.sheep.gamegroup.util;
 
 public class ConnectAddress {
 
-//    public static final String BASE_HTTP = "http://10.8.220.6:8080/";//何威
-    public static final String BASE_HTTP = "http://10.8.220.5:8080/";//张伟
+    public static final String BASE_HTTP = "http://10.8.220.6:8080/";//何威
+//    public static final String BASE_HTTP = "http://10.8.220.5:8080/";//张伟
 //    public static final String BASE_HTTP = "http://test.sheep.kfzs.com/";//测试服地址
 
     public static final String V1 = "/v1/";

+ 1 - 0
build.gradle

@@ -23,6 +23,7 @@ allprojects {
         maven { url "https://github.com/KuaiFaMaster/kfsdk/raw/master" }
         jcenter()
         maven { url "https://jitpack.io" }
+        google()
     }
 }
 

+ 1 - 3
datashare/build.gradle

@@ -27,9 +27,7 @@ android {
 }
 
 dependencies {
-    compile fileTree(include: ['*.jar'], dir: 'libs')
-    testCompile 'junit:junit:4.12'
-    compile 'com.android.support:support-v4:23.4.0'
+    compile 'com.android.support:support-v4:27.0.2'
     compile 'org.greenrobot:greendao:3.2.2'
 }
 

+ 3 - 5
view/build.gradle

@@ -29,11 +29,9 @@ android {
 }
 
 dependencies {
-    compile fileTree(include: ['*.jar'], dir: 'libs')
-    compile 'com.android.support:appcompat-v7:23.4.0'
-    compile 'com.android.support:support-v4:23.4.0'
-    testCompile 'junit:junit:4.12'
-    compile 'com.github.bumptech.glide:glide:3.5.2'
+    compile 'com.android.support:appcompat-v7:27.0.2'
+    compile 'com.android.support:support-v4:27.0.2'
+    compile 'com.github.bumptech.glide:glide:3.7.0'
     compile 'jp.wasabeef:glide-transformations:2.0.2'
     compile 'com.nineoldandroids:library:2.4.0'
     compile 'cn.bingoogolapple:bga-banner:2.1.7@aar'