Skip to content

Commit

Permalink
Merge pull request #240 from jmblq/master
Browse files Browse the repository at this point in the history
[message]:欧洲要求最低complieSdkTarget 29,需要迁移androidx,在1.5.6基础上迁移到androix,…
  • Loading branch information
liyujiang-gzu authored Oct 20, 2020
2 parents 1c151c9 + 634ac2e commit dd22b2d
Show file tree
Hide file tree
Showing 35 changed files with 75 additions and 83 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ android {
}

dependencies {
compile 'com.alibaba:fastjson:1.1.55.android'
compile project(':library:WheelPicker')
compile project(':library:FilePicker')
compile project(':library:ColorPicker')
compile project(':library:MultiplePicker')
implementation 'com.alibaba:fastjson:1.1.55.android'
implementation project(':library:WheelPicker')
implementation project(':library:FilePicker')
implementation project(':library:ColorPicker')
implementation project(':library:MultiplePicker')
// compile files('libs/AndroidPicker-1.5.6.jar')
// compile('cn.qqtheme.framework:WheelPicker:latest.release') {
// exclude group: 'com.android.support'
Expand Down
3 changes: 0 additions & 3 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,5 @@
*;
}

-dontwarn android.support.**
-keep class android.support.v4.** { *; }

#不混淆地址选择器的实体类,以便fastjson能正常解析
-keep class cn.qqtheme.framework.entity.** { *;}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.AsyncTask;
import android.support.annotation.WorkerThread;

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;

import androidx.annotation.WorkerThread;
import cn.qqtheme.framework.entity.City;
import cn.qqtheme.framework.entity.County;
import cn.qqtheme.framework.entity.Province;
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/cn/qqtheme/androidpicker/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
import android.os.Build;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.CallSuper;
import android.support.annotation.IdRes;
import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.v4.app.FragmentActivity;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
Expand All @@ -24,6 +19,11 @@
import java.util.ArrayList;
import java.util.List;

import androidx.annotation.CallSuper;
import androidx.annotation.IdRes;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.fragment.app.FragmentActivity;
import cn.qqtheme.framework.util.LogUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.Nullable;
import cn.qqtheme.framework.picker.OptionPicker;
import cn.qqtheme.framework.widget.WheelView;

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/cn/qqtheme/androidpicker/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/cn/qqtheme/androidpicker/StatusBarUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.support.annotation.ColorInt;
import android.support.annotation.IdRes;
import android.support.v4.widget.DrawerLayout;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
Expand All @@ -17,6 +14,9 @@

import java.lang.reflect.Field;

import androidx.annotation.ColorInt;
import androidx.annotation.IdRes;
import androidx.drawerlayout.widget.DrawerLayout;
import cn.qqtheme.framework.util.LogUtils;

/**
Expand Down
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ buildscript {
url 'https://dl.google.com/dl/android/maven2/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
Expand Down Expand Up @@ -95,8 +96,8 @@ subprojects {
}

dependencies {
compile "com.android.support:support-v4:${ANDROID_SUPPORT_VERSION}"
compile "com.android.support:support-annotations:${ANDROID_SUPPORT_VERSION}"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.annotation:annotation:1.2.0-alpha01"
}
}

Expand Down
18 changes: 11 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,28 @@ org.gradle.daemon=true
org.gradle.configureondemand=true

#项目路径含中文需加上此句
com.android.build.gradle.overridePathCheck=true
android.overridePathCheck=true

#支持NDK
#android.useDeprecatedNdk=true

#下面定义一些常量供gradle脚本使用
VERSION_NAME=1.5.6
VERSION_CODE=156
COMPILE_SDK_VERSION=25
VERSION_NAME=2.0.0
VERSION_CODE=200
COMPILE_SDK_VERSION=28
MIN_SDK_VERSION=14
#安卓6.0开始(API23+),需要动态申请权限
TARGET_SDK_VERSION=22
BUILD_TOOL_VERSION=25.0.1
TARGET_SDK_VERSION=28
BUILD_TOOL_VERSION=28.0.3
ANDROID_SUPPORT_VERSION=25.0.1
GROUP=cn.qqtheme.framework
SITE_URL=http://qqtheme.cn
GIT_URL=https://github.com/gzu-liyujiang/AndroidPicker.git
ISSUE_URL=https://github.com/gzu-liyujiang/AndroidPicker/issues
DEVELOPER_ID=liyujiang-gzu
DEVELOPER_NAME=liyujiang
DEVELOPER_EMAIL=[email protected]
DEVELOPER_EMAIL=[email protected]

#androidx
android.useAndroidX=true
android.enableJetifier=true
7 changes: 3 additions & 4 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Sat Jun 24 17:00:52 CST 2017
#Thu Oct 15 09:40:40 CST 2020
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
#distributionUrl=file\:/F:/android/sdk/gradle-3.3-all.zip
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion library/ColorPicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
}

dependencies {
compile project(":library:Common")
api project(":library:Common")
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.support.annotation.ColorInt;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import java.util.Locale;

import androidx.annotation.ColorInt;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import cn.qqtheme.framework.icons.ColorPickerIcon;
import cn.qqtheme.framework.popup.ConfirmPopup;
import cn.qqtheme.framework.util.ConvertUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.support.annotation.ColorInt;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.widget.TextView;

import java.lang.reflect.Field;

import androidx.annotation.ColorInt;
import cn.qqtheme.framework.util.ConvertUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import android.content.DialogInterface;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.support.annotation.CallSuper;
import android.support.annotation.StyleRes;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.KeyEvent;
Expand All @@ -16,6 +14,7 @@
import android.view.Window;
import android.widget.FrameLayout;

import androidx.annotation.StyleRes;
import cn.qqtheme.framework.util.LogUtils;
import cn.qqtheme.framework.util.ScreenUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

import android.app.Activity;
import android.graphics.Color;
import android.support.annotation.ColorInt;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.View;
Expand All @@ -15,6 +10,7 @@
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.annotation.*;
import cn.qqtheme.framework.util.ConvertUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.DrawableRes;
import android.view.View;
import androidx.annotation.DrawableRes;

/**
* 兼容旧版&新版
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.support.annotation.ColorInt;
import android.support.annotation.FloatRange;
import android.text.TextUtils;
import android.view.View;
import android.widget.ListView;
import android.widget.ScrollView;
import androidx.annotation.ColorInt;
import androidx.annotation.FloatRange;

import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cn.qqtheme.framework.util;

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

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
2 changes: 1 addition & 1 deletion library/FilePicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ ext {
}

dependencies {
compile project(":library:Common")
api project(":library:Common")
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.support.annotation.ColorInt;
import androidx.annotation.ColorInt;

/**
* 按下状态与普通状态下显示不同的颜色
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.Gravity;
import android.view.View;
import android.widget.AdapterView;
Expand All @@ -17,6 +14,9 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import cn.qqtheme.framework.adapter.FileAdapter;
import cn.qqtheme.framework.adapter.PathAdapter;
import cn.qqtheme.framework.entity.FileItem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cn.qqtheme.framework.util;

import android.support.annotation.IntDef;
import android.webkit.MimeTypeMap;
import androidx.annotation.IntDef;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
Expand Down
4 changes: 2 additions & 2 deletions library/ImagePicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ ext {
}

dependencies {
compile 'com.squareup.picasso:picasso:latest.release'
compile project(":library:Common")
implementation 'com.squareup.picasso:picasso:latest.release'
implementation project(":library:Common")
}
2 changes: 1 addition & 1 deletion library/MultiplePicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ ext {
}

dependencies {
compile project(":library:Common")
api project(":library:Common")
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cn.qqtheme.framework.picker;

import android.app.Activity;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.widget.CheckBox;
import android.widget.LinearLayout;
Expand All @@ -12,6 +11,7 @@
import java.util.Arrays;
import java.util.List;

import androidx.annotation.NonNull;
import cn.qqtheme.framework.popup.ConfirmPopup;

/**
Expand Down
2 changes: 1 addition & 1 deletion library/WheelPicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ ext {
}

dependencies {
compile project(":library:Common")
api project(":library:Common")
}
Loading

0 comments on commit dd22b2d

Please sign in to comment.