[6.0.0] 1、java->kotlin,arouter对应的插件要重新配置 2、gradle升级到4.0.0
This commit is contained in:
@@ -16,9 +16,10 @@ android {
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [AROUTER_MODULE_NAME: project.getName(),"room.schemaLocation": "$projectDir/schemas".toString()]
|
||||
kapt {
|
||||
useBuildCache = false
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,15 +52,20 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation rootProject.ext.dependencies.material
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
implementation "androidx.fragment:fragment-ktx:1.3.6"
|
||||
|
||||
kapt "android.arch.lifecycle:extensions:1.1.1"
|
||||
kapt "android.arch.persistence.room:compiler:1.1.1"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
|
||||
|
||||
// annotationProcessor"android.arch.lifecycle:compiler:1.1.1"
|
||||
// kapt"android.arch.lifecycle:compiler:1.1.1"
|
||||
|
||||
annotationProcessor"android.arch.persistence.room:compiler:1.1.1"
|
||||
kapt"android.arch.persistence.room:compiler:1.1.1"
|
||||
|
||||
implementation project(":OCH:mogo-och-common-module")
|
||||
compileOnly project(":libraries:mogo-map")
|
||||
|
||||
@@ -57,7 +57,7 @@ interface OchLoginServiceApi {
|
||||
* @return
|
||||
*/
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
@GET( "/autopilot-car-hailing/operation/v1/driver/taxi/loginStatus")
|
||||
@GET( "/och-taxi-cabin/api/business/v1/loginStatus")
|
||||
Observable<DriverStatusQueryRespBean> queryDriverServiceStatusAndLoginStatus(@Header ("appId") String appId
|
||||
, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.och.taxi.ui
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.os.Build
|
||||
@@ -88,8 +87,9 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
return "TaxiBeingTaskFragment"
|
||||
}
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
@@ -105,8 +105,7 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
private fun initData() {
|
||||
|
||||
lifecycleScope.launchWhenStarted {
|
||||
mViewModel.let {
|
||||
it.uiIntentFlow.collect { state ->
|
||||
mViewModel.uiIntentFlow.collect { state ->
|
||||
d(TAG,"uiIntentFlow: $state")
|
||||
when(state){
|
||||
is UnmannedIntent.GetNextTask -> {
|
||||
@@ -119,13 +118,12 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//监听返回的数据状态
|
||||
lifecycleScope.launchWhenStarted {
|
||||
mViewModel.let{
|
||||
it.uiStateFlow.map {it.taskUiState}.collect {state ->
|
||||
mViewModel.uiStateFlow.map {it.taskUiState}.collect {state ->
|
||||
d(TAG,"uiStateFlow: $state")
|
||||
when(state){
|
||||
is TaskUiState.INIT -> {
|
||||
@@ -138,7 +136,6 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,9 +385,9 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
private fun startOrEndService() {
|
||||
if (mCurrentOrder == null) return
|
||||
if (TaxiOrderStatusEnum.ArriveAtStart.code == mCurrentOrder!!.orderStatus) { //到达乘客上车点,司机可跳过乘客屏认证
|
||||
mViewModel?.sendUiIntent(UnmannedIntent.JumpPassengerCheckDone)
|
||||
mViewModel.sendUiIntent(UnmannedIntent.JumpPassengerCheckDone)
|
||||
} else if (TaxiOrderStatusEnum.ArriveAtEnd.code == mCurrentOrder!!.orderStatus) { //点击了完成服务,结束订单并更新订单信息
|
||||
mViewModel?.sendUiIntent(UnmannedIntent.JourneyCompleted)
|
||||
mViewModel.sendUiIntent(UnmannedIntent.JourneyCompleted)
|
||||
} else if (TaxiOrderStatusEnum.OnTheWayToEnd.code == mCurrentOrder!!.orderStatus) { //前往目的地过程中可提前结束行程
|
||||
//自驾中提示,接管后才能结束
|
||||
if (getState()
|
||||
@@ -413,7 +410,7 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
.build(requireContext())
|
||||
closeOrderDialog!!.setClickListener(object : OCHCommitDialog.ClickListener {
|
||||
override fun confirm() {
|
||||
mViewModel?.sendUiIntent(UnmannedIntent.CloseOrderByDriver)
|
||||
mViewModel.sendUiIntent(UnmannedIntent.CloseOrderByDriver)
|
||||
}
|
||||
|
||||
override fun cancel() {
|
||||
@@ -821,9 +818,7 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
}
|
||||
|
||||
fun updateOrderBottomBtnUI() {
|
||||
mViewModel?.let {
|
||||
it.sendUiIntent(UnmannedIntent.StartTask)
|
||||
}
|
||||
mViewModel.sendUiIntent(UnmannedIntent.StartTask)
|
||||
}
|
||||
|
||||
private fun updateOrderBottomBtn(txt: String?, txtColorId: Int, bgColorId: Int, isClickable: Boolean) {
|
||||
|
||||
@@ -44,8 +44,7 @@ class TaxiReserveOrderFragment : BaseFragment() {
|
||||
private fun initData() {
|
||||
//监听返回的数据状态
|
||||
lifecycleScope.launchWhenStarted {
|
||||
mViewModel.let{
|
||||
it.uiStateFlow.map {it.orderUiState}.collect {state ->
|
||||
mViewModel.uiStateFlow.map {it.orderUiState}.collect {state ->
|
||||
CallerLogger.d(TAG, "uiStateFlow: $state")
|
||||
when(state){
|
||||
is OrderUiState.INIT -> {
|
||||
@@ -58,7 +57,6 @@ class TaxiReserveOrderFragment : BaseFragment() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
ext {
|
||||
gradle_version = '3.5.3'
|
||||
gradle_version = '4.0.0'
|
||||
kotlin_version = '1.5.30'
|
||||
plugin_version = '10.0.0_mogo'
|
||||
hook_log_plugin_version = '1.7.2'
|
||||
|
||||
Reference in New Issue
Block a user