multi variant

This commit is contained in:
MooN 2025-12-08 11:44:23 +06:30
parent eebe9ac2c6
commit 3fe711cc2f
5 changed files with 69 additions and 16 deletions

View File

@ -11,25 +11,63 @@ android {
compileSdk 34 compileSdk 34
defaultConfig { defaultConfig {
applicationId "com.utsmm.kbz.sit" minSdk 23
}
defaultConfig {
minSdk 24 minSdk 24
targetSdk 33 targetSdk 33
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
// applicationId "com.utsmm.kbz"
// versionName "1.10"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// // Add CMake configuration
// externalNativeBuild {
// cmake {
// cppFlags "-std=c++14"
// }
// }
} }
// -----------------------------
// 🔥 MULTI-VARIANT FLAVORS
// -----------------------------
flavorDimensions "env"
productFlavors {
sit {
dimension "env"
applicationId "com.utsmm.kbz.sit"
versionNameSuffix "-sit"
resValue "string", "app_name", "KBZ-POS-SIT"
}
uat {
dimension "env"
applicationId "com.utsmm.kbz.uat"
versionNameSuffix "-uat"
resValue "string", "app_name", "KBZ-POS-UAT"
}
prod {
dimension "env"
applicationId "com.utsmm.kbz"
versionNameSuffix ""
}
}
// defaultConfig {
// applicationId "com.utsmm.kbz.sit"
// minSdk 24
// targetSdk 33
// versionCode 1
// versionName "1.0"
//
//// applicationId "com.utsmm.kbz"
//// versionName "1.10"
//
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//
//// // Add CMake configuration
//// externalNativeBuild {
//// cmake {
//// cppFlags "-std=c++14"
//// }
//// }
// }
// Configure CMake // Configure CMake
// externalNativeBuild { // externalNativeBuild {
// cmake { // cmake {
@ -43,6 +81,9 @@ android {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
debug {
debuggable true
}
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_11 sourceCompatibility JavaVersion.VERSION_11

View File

@ -106,6 +106,9 @@ public class DashboardTransFragment extends DataBindingFragment {
case HISTORY: case HISTORY:
new DashboardTransFragment.ClickEvent().onClickHistory(); new DashboardTransFragment.ClickEvent().onClickHistory();
break; break;
case DEVICE_CONFIG:
new DashboardTransFragment.ClickEvent().onClickDeviceConfig();
break;
} }
}); });
@ -210,7 +213,10 @@ public class DashboardTransFragment extends DataBindingFragment {
safeRouteTo(currentId,routeId,hostId); safeRouteTo(currentId,routeId,hostId);
} }
public void onClickDeviceConfig(){
routeId = R.id.action_dashboardTransFragment_to_deviceConfig;
safeRouteTo(currentId, routeId, hostId);
}
} }
} }

View File

@ -21,5 +21,6 @@ public enum FeaturesType {
TEST, TEST,
QR_INQUIRY, QR_INQUIRY,
QR_REFUND, QR_REFUND,
LOG_OUT LOG_OUT,
DEVICE_CONFIG
} }

View File

@ -177,7 +177,6 @@ public class TMSUtil {
LogUtil.d(TAG,"Receipt Footer: "+SystemParamsOperation.getInstance().getReceiptFooter()); LogUtil.d(TAG,"Receipt Footer: "+SystemParamsOperation.getInstance().getReceiptFooter());
LogUtil.d(TAG,"Manual Update: "+SystemParamsOperation.getInstance().getManualUpdate()); LogUtil.d(TAG,"Manual Update: "+SystemParamsOperation.getInstance().getManualUpdate());
LogUtil.d(TAG,"Master Enabled: "+SystemParamsOperation.getInstance().isEmvEnabled()); LogUtil.d(TAG,"Master Enabled: "+SystemParamsOperation.getInstance().isEmvEnabled());
} }
@ -220,7 +219,7 @@ public class TMSUtil {
// featuresList.add(new Features(5, fragmentActivity.getString(R.string.menu_wavepay_inquiry), R.drawable.ic_wave_status_dash, FeaturesType.WAVE_PAY_INQUIRY, wavePayInquiryStatus)); // featuresList.add(new Features(5, fragmentActivity.getString(R.string.menu_wavepay_inquiry), R.drawable.ic_wave_status_dash, FeaturesType.WAVE_PAY_INQUIRY, wavePayInquiryStatus));
featuresList.add(new Features(1, fragmentActivity.getString(R.string.menu_cash_advance), R.drawable.ic_cash_advance, FeaturesType.CASH_ADVANCE, cashAdvanceStatus)); featuresList.add(new Features(1, fragmentActivity.getString(R.string.menu_cash_advance), R.drawable.ic_cash_advance, FeaturesType.CASH_ADVANCE, cashAdvanceStatus));
featuresList.add(new Features(9, fragmentActivity.getString(R.string.menu_history), R.drawable.ic_history, FeaturesType.HISTORY, true)); featuresList.add(new Features(9, fragmentActivity.getString(R.string.menu_history), R.drawable.ic_history, FeaturesType.HISTORY, true));
featuresList.add(new Features(10, "Configs", R.drawable.ic_host, FeaturesType.DEVICE_CONFIG, true));
} }
public TMSValidity checkParams() { public TMSValidity checkParams() {

View File

@ -589,6 +589,12 @@
app:popUpToInclusive="true" app:popUpToInclusive="true"
android:id="@+id/action_dashboardTransFragment_to_manageFunctionFragment" android:id="@+id/action_dashboardTransFragment_to_manageFunctionFragment"
app:destination="@id/managementFunctionFragment" /> app:destination="@id/managementFunctionFragment" />
<action
app:launchSingleTop="true"
app:popUpTo="@+id/dashboardTransFragment"
app:popUpToInclusive="true"
android:id="@+id/action_dashboardTransFragment_to_deviceConfig"
app:destination="@id/hostConfigFragment" />
</fragment> </fragment>
<dialog <dialog
tools:layout="@layout/fragment_dashboard_bottom_sheet_pre_auth" tools:layout="@layout/fragment_dashboard_bottom_sheet_pre_auth"