统一升级Android依赖包,AndroidX

This commit is contained in:
董宏宇
2021-09-06 15:28:35 +08:00
parent a853b47f05
commit a454f3649e
21 changed files with 61 additions and 40 deletions

View File

@@ -48,9 +48,9 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'com.android.support:multidex:1.0.3'
implementation rootProject.ext.dependencies.androidAppCompat
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.crashSdk
implementation rootProject.ext.dependencies.androidConstraintLayout
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.rxjava
implementation rootProject.ext.dependencies.rxandroid
// 从车机获取视频流

View File

@@ -1,7 +1,6 @@
package com.mogo.cloud;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
@@ -10,6 +9,8 @@ import android.widget.TextView;
import android.widget.Toast;
import android.widget.ToggleButton;
import androidx.appcompat.app.AppCompatActivity;
import com.mogo.cloud.util.YuvToolUtils;
import com.zhidao.manager.camera.FrameBufferCallBack;
import com.zhidao.manager.camera.ZDCameraManager;

View File

@@ -1,11 +1,12 @@
package com.mogo.cloud;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
/**

View File

@@ -2,7 +2,6 @@ package com.mogo.cloud;
import android.net.wifi.WifiInfo;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.SurfaceView;
import android.widget.EditText;
@@ -10,6 +9,8 @@ import android.widget.TextView;
import android.widget.Toast;
import android.widget.ToggleButton;
import androidx.appcompat.app.AppCompatActivity;
import com.mogo.cloud.live.manager.LiveStreamManagerImpl;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.cloud.trafficlive.api.ITrafficCarLiveCallBack;

View File

@@ -2,11 +2,12 @@ package com.mogo.cloud;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.widget.Button;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.mogo.cloud.network.NetworkActivity;
import com.mogo.cloud.passport.IMoGoTokenCallback;
import com.mogo.cloud.passport.MoGoAiCloudClient;

View File

@@ -1,10 +1,11 @@
package com.mogo.cloud;
import android.support.annotation.Nullable;
import android.support.multidex.MultiDexApplication;
import android.util.Log;
import androidx.annotation.Nullable;
import androidx.multidex.MultiDexApplication;
import com.auto.zhidao.logsdk.CrashSystem;
import com.mogo.cloud.httpdns.MogoHttpDnsClient;
import com.mogo.cloud.httpdns.MogoHttpDnsConfig;

View File

@@ -1,10 +1,11 @@
package com.mogo.cloud;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.cloud.socket.entity.SocketDownData;
import com.mogo.realtime.api.MoGoAiCloudRealTime;

View File

@@ -1,11 +1,12 @@
package com.mogo.cloud;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.google.gson.Gson;
import com.mogo.cloud.network.BaseData;
import com.mogo.cloud.tanlu.api.MogoRoadSearchManager;

View File

@@ -1,7 +1,6 @@
package com.mogo.cloud.network;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
@@ -20,6 +19,8 @@ import io.reactivex.schedulers.Schedulers;
import static com.mogo.cloud.network.NetConstants.GEOFENCE_HOST;
import static com.mogo.cloud.network.NetConstants.REALTIME_LOCATION_HOST;
import androidx.appcompat.app.AppCompatActivity;
/**
* created by wujifei on 2021/1/21 12:26
* describe:

View File

@@ -2,7 +2,7 @@
apply from: "config.gradle"
buildscript {
ext.kotlin_version = "1.3.72"
ext.kotlin_version = '1.4.20'
repositories {
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
@@ -17,7 +17,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath "com.android.tools.build:gradle:3.5.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
// 对kotlin生成doc

View File

@@ -1,16 +1,16 @@
ext {
time = ""
kotlin_version = "1.3.41"
kotlin_version = "1.4.20"
android = [
compileSdkVersion: 28,
buildToolsVersion: "28.0.3",
compileSdkVersion: 29,
buildToolsVersion: "29.0.2",
minSdkVersion : 19,
targetSdkVersion : 22,
]
dependencies = [
// android
androidAppCompat : "com.android.support:support-compat:28.0.0",
androidConstraintLayout : "com.android.support.constraint:constraint-layout:2.0.4",
androidxappcompat : "androidx.appcompat:appcompat:1.3.1",
androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:2.1.0",
boostmultidex : "com.bytedance.boost_multidex:boost_multidex:1.0.1",
// flexbox
flexbox : 'com.google.android:flexbox:2.0.1',

View File

@@ -41,7 +41,7 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.androidAppCompat
implementation rootProject.ext.dependencies.androidxappcompat
// implementation rootProject.ext.dependencies.live_sdk_zego
implementation files('libs/ZegoExpressEngine.jar')

View File

@@ -1,10 +1,11 @@
package com.mogo.cloud.passport;
import android.content.Context;
import android.support.annotation.Keep;
import android.util.Log;
import android.widget.Toast;
import androidx.annotation.Keep;
import com.mogo.cloud.httpdns.MogoHttpDnsClient;
import com.mogo.cloud.httpdns.MogoHttpDnsConfig;
import com.mogo.cloud.utils.logger.LogLevel;

View File

@@ -2,7 +2,6 @@ package com.mogo.cloud.socket;
import android.content.Context;
import android.support.annotation.NonNull;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
@@ -25,6 +24,8 @@ import java.util.concurrent.ConcurrentHashMap;
import static com.mogo.cloud.socket.SocketServicesConstants.TAG;
import androidx.annotation.NonNull;
/**
* Socket 长链核心服务

View File

@@ -1,7 +1,6 @@
package com.mogo.cloud.socket;
import android.support.annotation.Keep;
import com.mogo.cloud.passport.MoGoAiCloudClient;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
@@ -12,6 +11,8 @@ import static com.mogo.cloud.httpdns.MogoHttpDnsConfig.HTTP_DNS_ENV_DEV;
import static com.mogo.cloud.httpdns.MogoHttpDnsConfig.HTTP_DNS_ENV_QA;
import static com.mogo.cloud.httpdns.MogoHttpDnsConfig.HTTP_DNS_ENV_RELEASE;
import androidx.annotation.Keep;
public class SocketServicesConstants {
public static final String TAG = "MoGoAiCloud_Socket";

View File

@@ -1,7 +1,6 @@
package com.mogo.cloud.socket.third;
import android.content.Context;
import android.support.annotation.NonNull;
import com.mogo.cloud.passport.MoGoAiCloudClient;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
@@ -20,6 +19,8 @@ import static com.mogo.cloud.socket.SocketServicesConstants.SOCKET_CHANNEL_ID;
import static com.mogo.cloud.socket.SocketServicesConstants.TAG;
import static com.mogo.cloud.socket.SocketServicesConstants.getEnvironment;
import androidx.annotation.NonNull;
public class ThirdSocketManager implements Callback {
private static volatile ThirdSocketManager mInstance;

View File

@@ -19,8 +19,14 @@ org.gradle.parallel=true
# Only relevant projects are configured which results in faster builds for large multi-projects.
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:configuration_on_demand
org.gradle.configureondemand=true
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
## maven 配置
RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/
SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
@@ -30,22 +36,22 @@ PASSWORD=xintai2018
RELEASE=true
# AI CLOUD 云平台
# 工具类
MOGO_UTILS_VERSION=1.1.42
MOGO_UTILS_VERSION=1.1.44
# 网络请求
MOGO_NETWORK_VERSION=1.1.42
MOGO_NETWORK_VERSION=1.1.44
# 网络DNS
MOGO_HTTPDNS_VERSION=1.1.42
MOGO_HTTPDNS_VERSION=1.1.44
# 鉴权
MOGO_PASSPORT_VERSION=1.1.42
MOGO_PASSPORT_VERSION=1.1.44
# 常链接
MOGO_SOCKET_VERSION=1.1.42
MOGO_SOCKET_VERSION=1.1.44
# 数据采集
MOGO_REALTIME_VERSION=1.1.42
MOGO_REALTIME_VERSION=1.1.44
# 探路,道路事件发布,获取
MOGO_TANLU_VERSION=1.1.42
MOGO_TANLU_VERSION=1.1.44
# 直播推流
MOGO_LIVE_VERSION=1.1.42
MOGO_LIVE_VERSION=1.1.44
# 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.1.42
MOGO_TRAFFICLIVE_VERSION=1.1.44
# 定位服务
MOGO_LOCATION_VERSION=1.1.42
MOGO_LOCATION_VERSION=1.1.44

View File

@@ -3,12 +3,13 @@ package com.mogo.realtime.core;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.support.annotation.Keep;
import com.mogo.cloud.utils.logger.Logger;
import static com.mogo.realtime.constant.RealTimeConstant.TAG;
import androidx.annotation.Keep;
/**
* AI云 实时上报数据频率处理类
*/

View File

@@ -3,7 +3,8 @@ package com.mogo.realtime.util;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.RequiresApi;
import androidx.annotation.RequiresApi;
import java.util.Objects;

View File

@@ -3,7 +3,7 @@ package com.mogo.cloud.tanlu.utils
import android.graphics.Bitmap
import android.media.MediaMetadataRetriever
import android.os.Environment
import android.support.annotation.Keep
import androidx.annotation.Keep
import java.io.*
import java.text.SimpleDateFormat
import java.util.*

View File

@@ -1,7 +1,8 @@
package com.mogo.cloud.tanlu.utils;
import android.support.annotation.Keep;
import androidx.annotation.Keep;
import java.util.regex.Pattern;