Feat(P3): Modularize module and add Pardakht Novin support
- Split `p3` module into `p3_pardakht_novin` and `p3_sepehr` sub-modules - Create `pardakht_novin_app` module with dedicated WebView and Hilt configuration - Rename P3 services, printers, and models to be vendor-specific (e.g., `P3PardakhtNovinService`) - Add `p3_pardakht_novin` and `p3_sepehr` product flavors to `tis_app` and `stage_app` - Update project settings and build configurations to include the new modular structure - Implement Sepehr-specific POS and Printer services in the new module
This commit is contained in:
+14
-15
@@ -22,28 +22,27 @@ android {
|
||||
|
||||
flavorDimensions.add("module")
|
||||
productFlavors {
|
||||
create("p3") {
|
||||
create("p3_pardakht_novin") {
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
dimension = "module"
|
||||
applicationId = "com.example.tis_app_p3"
|
||||
manifestPlaceholders["appName"] = "تیس"
|
||||
applicationId = "com.example.tis_app_p3_pardakht_novin"
|
||||
manifestPlaceholders["appName"] = "تیس (نوین)"
|
||||
}
|
||||
create("ps4") {
|
||||
create("p3_sepehr") {
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
dimension = "module"
|
||||
applicationId = "com.example.tis_app_p4"
|
||||
manifestPlaceholders["appName"] = "تیس" }
|
||||
create("standard") {
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
dimension = "module"
|
||||
applicationId = "com.example.tis_app"
|
||||
manifestPlaceholders["appName"] = "تیس" }
|
||||
applicationId = "com.example.tis_app_p3_sepehr"
|
||||
manifestPlaceholders["appName"] = "تیس (سپهر)"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix = ".debug"
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
@@ -66,10 +65,10 @@ android {
|
||||
dependencies {
|
||||
implementation(project(":core"))
|
||||
implementation(project(":design_system"))
|
||||
"p3Implementation"(project(":p3"))
|
||||
|
||||
"ps4Implementation"(project(":ps4"))
|
||||
|
||||
"p3_pardakht_novinImplementation"(project(":p3:p3_pardakht_novin"))
|
||||
"p3_sepehrImplementation"(project(":p3:p3_sepehr"))
|
||||
|
||||
implementation(libs.hilt.android)
|
||||
ksp(libs.hilt.compiler)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.example.core.getDeviceName
|
||||
import com.example.design_system.PspWebView
|
||||
import com.example.tis_app.viewmodel.WebViewModel
|
||||
|
||||
private const val tisWebUrl = "https://tis.shift-am.ir"
|
||||
private const val tisWebUrl = "192.168.128.73:5000"
|
||||
private const val tisWebViewTag = "TisWebViewScreen"
|
||||
|
||||
@Composable
|
||||
|
||||
+4
-4
@@ -2,8 +2,8 @@ package com.example.tis_app.di
|
||||
|
||||
import com.example.core.domain.Printer
|
||||
import com.example.core.domain.PspService
|
||||
import com.example.p3.P3Printer
|
||||
import com.example.p3.P3Service
|
||||
import com.example.p3_pardakht_novin.P3PardakhtNovinPrinter
|
||||
import com.example.p3_pardakht_novin.P3PardakhtNovinService
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
@@ -13,8 +13,8 @@ import dagger.hilt.components.SingletonComponent
|
||||
@InstallIn(SingletonComponent::class)
|
||||
abstract class PspModule {
|
||||
@Binds
|
||||
abstract fun bindPspService(impl: P3Service): PspService
|
||||
abstract fun bindPspService(impl: P3PardakhtNovinService): PspService
|
||||
|
||||
@Binds
|
||||
abstract fun bindPrinter(impl: P3Printer): Printer
|
||||
abstract fun bindPrinter(impl: P3PardakhtNovinPrinter): Printer
|
||||
}
|
||||
Reference in New Issue
Block a user