Skip to content

Commit

Permalink
Use default Res Package directory
Browse files Browse the repository at this point in the history
  • Loading branch information
AmniX committed Nov 11, 2024
1 parent a4f6c13 commit f4b14a4
Show file tree
Hide file tree
Showing 21 changed files with 205 additions and 199 deletions.
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ mavenPublish = "0.30.0"
dokka = "1.9.20"
compose-multiplatform = "1.7.0"
jetbrainsComposeLifecycle = "2.8.3"
androidx-ui-tooling = "1.7.5"

[libraries]
androidx-browser = { module = "androidx.browser:browser", version.ref = "browser" }
human-readable = { module = "nl.jacobras:Human-Readable", version.ref = "humanReadable" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanaryAndroid" }
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-ui-tooling" }
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "fragmentKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
Expand Down
12 changes: 8 additions & 4 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
linkerOpts("-make_mergeable")
xcf.add(this)
baseName = "komojuShared"
isStatic = true
Expand Down Expand Up @@ -70,6 +69,7 @@ kotlin {
implementation(libs.ktor.client.okhttp)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.androidx.browser)
implementation(libs.androidx.compose.ui.tooling.preview)
}
iosMain.dependencies {
implementation(libs.ktor.client.darwin)
Expand All @@ -96,11 +96,15 @@ android {
resourcePrefix = "komoju_"
}

dependencies {
debugImplementation(libs.androidx.ui.tooling)
}

compose {
resources {
publicResClass = false
packageOfResClass = "com.komoju.mobile.sdk.shared.generated.resources"
generateResClass = auto
publicResClass = true
//packageOfResClass = "com.komoju.mobile.sdk.shared.generated.resources"
generateResClass = always
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,6 @@ import cafe.adriel.voyager.core.model.rememberScreenModel
import cafe.adriel.voyager.core.screen.Screen
import com.komoju.mobile.sdk.entities.Payment
import com.komoju.mobile.sdk.entities.PaymentStatus
import com.komoju.mobile.sdk.shared.generated.resources.Res
import com.komoju.mobile.sdk.shared.generated.resources.komoju_awaiting_payment
import com.komoju.mobile.sdk.shared.generated.resources.komoju_awaiting_payment_instruction
import com.komoju.mobile.sdk.shared.generated.resources.komoju_confirmation_code
import com.komoju.mobile.sdk.shared.generated.resources.komoju_done
import com.komoju.mobile.sdk.shared.generated.resources.komoju_error
import com.komoju.mobile.sdk.shared.generated.resources.komoju_have_a_question_contact_us
import com.komoju.mobile.sdk.shared.generated.resources.komoju_i_will_do_it_later
import com.komoju.mobile.sdk.shared.generated.resources.komoju_ic_payment_status_completed
import com.komoju.mobile.sdk.shared.generated.resources.komoju_ic_payment_status_failed
import com.komoju.mobile.sdk.shared.generated.resources.komoju_ic_payment_status_konbini_pending
import com.komoju.mobile.sdk.shared.generated.resources.komoju_ic_payment_status_prenidng
import com.komoju.mobile.sdk.shared.generated.resources.komoju_okay
import com.komoju.mobile.sdk.shared.generated.resources.komoju_payment_failed
import com.komoju.mobile.sdk.shared.generated.resources.komoju_payment_successful
import com.komoju.mobile.sdk.shared.generated.resources.komoju_receipt_number
import com.komoju.mobile.sdk.shared.generated.resources.komoju_total_payment
import com.komoju.mobile.sdk.shared.generated.resources.komoju_update_payment_method
import com.komoju.mobile.sdk.shared.generated.resources.komoju_view_instructions
import com.komoju.mobile.sdk.shared.generated.resources.komoju_your_payment_has_been_processed_successfully
import com.komoju.mobile.sdk.shared.generated.resources.komoju_your_payment_has_failed
import com.komoju.mobile.sdk.shared.generated.resources.komoju_your_payment_is_awaiting_processing
import com.komoju.mobile.sdk.ui.composables.PrimaryButton
import com.komoju.mobile.sdk.ui.composables.TextButton
import com.komoju.mobile.sdk.ui.composables.ThemedCircularProgressIndicator
Expand All @@ -63,6 +41,28 @@ import com.komoju.mobile.sdk.ui.theme.Gray200
import com.komoju.mobile.sdk.ui.theme.Gray50
import com.komoju.mobile.sdk.ui.theme.Gray700
import com.komoju.mobile.sdk.utils.AmountUtils
import komoju_mobile_sdk.shared.generated.resources.Res
import komoju_mobile_sdk.shared.generated.resources.komoju_awaiting_payment
import komoju_mobile_sdk.shared.generated.resources.komoju_awaiting_payment_instruction
import komoju_mobile_sdk.shared.generated.resources.komoju_confirmation_code
import komoju_mobile_sdk.shared.generated.resources.komoju_done
import komoju_mobile_sdk.shared.generated.resources.komoju_error
import komoju_mobile_sdk.shared.generated.resources.komoju_have_a_question_contact_us
import komoju_mobile_sdk.shared.generated.resources.komoju_i_will_do_it_later
import komoju_mobile_sdk.shared.generated.resources.komoju_ic_payment_status_completed
import komoju_mobile_sdk.shared.generated.resources.komoju_ic_payment_status_failed
import komoju_mobile_sdk.shared.generated.resources.komoju_ic_payment_status_konbini_pending
import komoju_mobile_sdk.shared.generated.resources.komoju_ic_payment_status_prenidng
import komoju_mobile_sdk.shared.generated.resources.komoju_okay
import komoju_mobile_sdk.shared.generated.resources.komoju_payment_failed
import komoju_mobile_sdk.shared.generated.resources.komoju_payment_successful
import komoju_mobile_sdk.shared.generated.resources.komoju_receipt_number
import komoju_mobile_sdk.shared.generated.resources.komoju_total_payment
import komoju_mobile_sdk.shared.generated.resources.komoju_update_payment_method
import komoju_mobile_sdk.shared.generated.resources.komoju_view_instructions
import komoju_mobile_sdk.shared.generated.resources.komoju_your_payment_has_been_processed_successfully
import komoju_mobile_sdk.shared.generated.resources.komoju_your_payment_has_failed
import komoju_mobile_sdk.shared.generated.resources.komoju_your_payment_is_awaiting_processing
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ import androidx.compose.ui.unit.sp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import cafe.adriel.voyager.core.model.rememberScreenModel
import cafe.adriel.voyager.core.screen.Screen
import com.komoju.mobile.sdk.shared.generated.resources.Res
import com.komoju.mobile.sdk.shared.generated.resources.komoju_back_to_store
import com.komoju.mobile.sdk.shared.generated.resources.komoju_credit_card_error
import com.komoju.mobile.sdk.shared.generated.resources.komoju_error_other
import com.komoju.mobile.sdk.shared.generated.resources.komoju_error_user_cancel
import com.komoju.mobile.sdk.shared.generated.resources.komoju_ic_payment_status_failed
import com.komoju.mobile.sdk.shared.generated.resources.komoju_payment_failed
import com.komoju.mobile.sdk.ui.composables.PrimaryButton
import com.komoju.mobile.sdk.ui.screens.KomojuPaymentRoute
import com.komoju.mobile.sdk.ui.screens.RouterEffect
import komoju_mobile_sdk.shared.generated.resources.Res
import komoju_mobile_sdk.shared.generated.resources.komoju_back_to_store
import komoju_mobile_sdk.shared.generated.resources.komoju_credit_card_error
import komoju_mobile_sdk.shared.generated.resources.komoju_error_other
import komoju_mobile_sdk.shared.generated.resources.komoju_error_user_cancel
import komoju_mobile_sdk.shared.generated.resources.komoju_ic_payment_status_failed
import komoju_mobile_sdk.shared.generated.resources.komoju_payment_failed
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ import cafe.adriel.voyager.core.model.rememberScreenModel
import cafe.adriel.voyager.core.screen.Screen
import com.komoju.mobile.sdk.KomojuMobileSDKConfiguration
import com.komoju.mobile.sdk.entities.PaymentMethod
import com.komoju.mobile.sdk.shared.generated.resources.Res
import com.komoju.mobile.sdk.shared.generated.resources.komoju_img_payment_footer
import com.komoju.mobile.sdk.shared.generated.resources.komoju_payment_options
import com.komoju.mobile.sdk.ui.composables.InlinedWebView
import com.komoju.mobile.sdk.ui.composables.ThemedCircularProgressIndicator
import com.komoju.mobile.sdk.ui.composables.launchCustomTab
import com.komoju.mobile.sdk.ui.screens.RouterEffect
import com.komoju.mobile.sdk.ui.screens.payment.composables.PaymentMethodForm
import com.komoju.mobile.sdk.ui.screens.payment.composables.PaymentMethodsRow
import com.komoju.mobile.sdk.ui.screens.payment.composables.PaymentSheetHandle
import komoju_mobile_sdk.shared.generated.resources.Res
import komoju_mobile_sdk.shared.generated.resources.komoju_img_payment_footer
import komoju_mobile_sdk.shared.generated.resources.komoju_payment_options
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,6 @@ import com.komoju.mobile.sdk.entities.SecureTokenResponse.Status.SKIPPED
import com.komoju.mobile.sdk.entities.SecureTokenResponse.Status.UNKNOWN
import com.komoju.mobile.sdk.navigation.RouterStateScreenModel
import com.komoju.mobile.sdk.remote.apis.KomojuRemoteApi
import com.komoju.mobile.sdk.shared.generated.resources.Res
import com.komoju.mobile.sdk.shared.generated.resources.komoju_cadrholder_name_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_please_select_a_konbini_brand
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_bit_cash_id_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_bit_cash_id_is_not_valid
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_card_number_is_not_valid
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_cardholder_name_is_not_valid
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_cvv_is_not_valid
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_email_is_not_valid
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_expiry_date_is_not_valid
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_first_name_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_first_name_phonetic_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_first_name_phonetic_must_be_a_kana
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_last_name_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_last_name_phonetic_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_last_name_phonetic_must_be_a_kana
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_name_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_net_cash_id_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_net_cash_id_is_not_valid
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_phone_number_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_phone_number_is_not_valid
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_prepaid_number_cannot_be_empty
import com.komoju.mobile.sdk.shared.generated.resources.komoju_the_entered_prepaid_number_is_not_valid
import com.komoju.mobile.sdk.ui.composables.InlinedPaymentPrimaryButtonState
import com.komoju.mobile.sdk.ui.screens.KomojuPaymentRoute
import com.komoju.mobile.sdk.ui.screens.Router
Expand All @@ -55,6 +32,29 @@ import com.komoju.mobile.sdk.utils.isDigitsOnly
import com.komoju.mobile.sdk.utils.isKanaOnly
import com.komoju.mobile.sdk.utils.isValidEmail
import com.komoju.mobile.sdk.utils.verifyTokenAndProcessPayment
import komoju_mobile_sdk.shared.generated.resources.Res
import komoju_mobile_sdk.shared.generated.resources.komoju_cadrholder_name_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_please_select_a_konbini_brand
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_bit_cash_id_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_bit_cash_id_is_not_valid
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_card_number_is_not_valid
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_cardholder_name_is_not_valid
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_cvv_is_not_valid
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_email_is_not_valid
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_expiry_date_is_not_valid
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_first_name_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_first_name_phonetic_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_first_name_phonetic_must_be_a_kana
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_last_name_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_last_name_phonetic_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_last_name_phonetic_must_be_a_kana
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_name_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_net_cash_id_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_net_cash_id_is_not_valid
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_phone_number_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_phone_number_is_not_valid
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_prepaid_number_cannot_be_empty
import komoju_mobile_sdk.shared.generated.resources.komoju_the_entered_prepaid_number_is_not_valid
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.intl.Locale
import androidx.compose.ui.unit.dp
import com.komoju.mobile.sdk.entities.PaymentMethod
import com.komoju.mobile.sdk.shared.generated.resources.Res
import com.komoju.mobile.sdk.shared.generated.resources.komoju_email
import com.komoju.mobile.sdk.shared.generated.resources.komoju_enter_your_email_address
import com.komoju.mobile.sdk.shared.generated.resources.komoju_enter_your_phone_number
import com.komoju.mobile.sdk.shared.generated.resources.komoju_first_name
import com.komoju.mobile.sdk.shared.generated.resources.komoju_first_name_phonetic
import com.komoju.mobile.sdk.shared.generated.resources.komoju_last_name
import com.komoju.mobile.sdk.shared.generated.resources.komoju_last_name_phonetic
import com.komoju.mobile.sdk.shared.generated.resources.komoju_pay
import com.komoju.mobile.sdk.shared.generated.resources.komoju_phone_number
import com.komoju.mobile.sdk.ui.composables.PrimaryButton
import com.komoju.mobile.sdk.ui.screens.payment.CommonDisplayData
import com.komoju.mobile.sdk.ui.theme.KomojuMobileSdkTheme
import com.komoju.mobile.sdk.utils.AmountUtils
import komoju_mobile_sdk.shared.generated.resources.Res
import komoju_mobile_sdk.shared.generated.resources.komoju_email
import komoju_mobile_sdk.shared.generated.resources.komoju_enter_your_email_address
import komoju_mobile_sdk.shared.generated.resources.komoju_enter_your_phone_number
import komoju_mobile_sdk.shared.generated.resources.komoju_first_name
import komoju_mobile_sdk.shared.generated.resources.komoju_first_name_phonetic
import komoju_mobile_sdk.shared.generated.resources.komoju_last_name
import komoju_mobile_sdk.shared.generated.resources.komoju_last_name_phonetic
import komoju_mobile_sdk.shared.generated.resources.komoju_pay
import komoju_mobile_sdk.shared.generated.resources.komoju_phone_number
import org.jetbrains.compose.resources.stringResource
import org.jetbrains.compose.ui.tooling.preview.Preview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.komoju.mobile.sdk.entities.PaymentMethod
import com.komoju.mobile.sdk.shared.generated.resources.Res
import com.komoju.mobile.sdk.shared.generated.resources.komoju_bitcash_information
import com.komoju.mobile.sdk.shared.generated.resources.komoju_hiragana_id
import com.komoju.mobile.sdk.shared.generated.resources.komoju_pay
import com.komoju.mobile.sdk.ui.composables.PrimaryButton
import com.komoju.mobile.sdk.ui.screens.payment.BitCashDisplayData
import com.komoju.mobile.sdk.utils.AmountUtils
import komoju_mobile_sdk.shared.generated.resources.Res
import komoju_mobile_sdk.shared.generated.resources.komoju_bitcash_information
import komoju_mobile_sdk.shared.generated.resources.komoju_hiragana_id
import komoju_mobile_sdk.shared.generated.resources.komoju_pay
import org.jetbrains.compose.resources.stringResource

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,7 @@ import androidx.compose.ui.text.toUpperCase
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.komoju.mobile.sdk.entities.PaymentMethod
import com.komoju.mobile.sdk.shared.generated.resources.Res
import com.komoju.mobile.sdk.shared.generated.resources.komoju_card_number
import com.komoju.mobile.sdk.shared.generated.resources.komoju_cardholder_name
import com.komoju.mobile.sdk.shared.generated.resources.komoju_cvv
import com.komoju.mobile.sdk.shared.generated.resources.komoju_full_name_on_card
import com.komoju.mobile.sdk.shared.generated.resources.komoju_ic_cvv
import com.komoju.mobile.sdk.shared.generated.resources.komoju_mm_yy
import com.komoju.mobile.sdk.shared.generated.resources.komoju_pay
import com.komoju.mobile.sdk.shared.generated.resources.komoju_save_this_card_for_future_payments
import komoju_mobile_sdk.shared.generated.resources.Res
import com.komoju.mobile.sdk.ui.composables.InlinedPaymentPrimaryButton
import com.komoju.mobile.sdk.ui.composables.PrimaryButton
import com.komoju.mobile.sdk.ui.screens.payment.CreditCardDisplayData
Expand All @@ -61,6 +53,14 @@ import com.komoju.mobile.sdk.utils.CreditCardUtils.formatOtherCardNumbers
import com.komoju.mobile.sdk.utils.CreditCardUtils.identifyCardScheme
import com.komoju.mobile.sdk.utils.CreditCardUtils.makeExpirationFilter
import com.komoju.mobile.sdk.utils.testID
import komoju_mobile_sdk.shared.generated.resources.komoju_card_number
import komoju_mobile_sdk.shared.generated.resources.komoju_cardholder_name
import komoju_mobile_sdk.shared.generated.resources.komoju_cvv
import komoju_mobile_sdk.shared.generated.resources.komoju_full_name_on_card
import komoju_mobile_sdk.shared.generated.resources.komoju_ic_cvv
import komoju_mobile_sdk.shared.generated.resources.komoju_mm_yy
import komoju_mobile_sdk.shared.generated.resources.komoju_pay
import komoju_mobile_sdk.shared.generated.resources.komoju_save_this_card_for_future_payments
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource
import org.jetbrains.compose.ui.tooling.preview.Preview
Expand Down
Loading

0 comments on commit f4b14a4

Please sign in to comment.