Skip to content

Commit

Permalink
force remove json
Browse files Browse the repository at this point in the history
Signed-off-by: kcw-grunt <[email protected]>
  • Loading branch information
kcw-grunt committed Apr 5, 2024
1 parent ef0f4a2 commit 265ee74
Show file tree
Hide file tree
Showing 28 changed files with 6,006 additions and 367 deletions.
38 changes: 27 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ android {
// Specifies two flavor dimensions.
flavorDimensions "mode"
productFlavors {
loaf {
litewallet {
applicationId "com.loafwallet"
dimension "mode"
resValue "string", "app_name", "Litewallet"
Expand All @@ -125,7 +125,7 @@ android {
}
}

loafTestnet {
litewalletTestnet {
applicationId "com.loafwallet.testnet"
dimension "mode"
resValue "string", "app_name", "Litewallet-testnet"
Expand Down Expand Up @@ -338,25 +338,41 @@ dependencies {
implementation 'com.google.android.play:core-ktx:1.8.1'

// Ktlint
ktlint 'com.pinterest:ktlint:0.50.0'
ktlint("com.pinterest.ktlint:ktlint-cli:1.2.1") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))
}
}
// additional 3rd party ruleset(s) can be specified here
// just add them to the classpath (e.g. ktlint 'groupId:artifactId:version') and
// ktlint will pick them up

//kotlin https://stackoverflow.com/questions/69817925/problem-duplicate-class-androidx-lifecycle-viewmodel-found-in-modules
def lifecycle_version = "2.4.0"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
}

task ktlint(type: JavaExec, group: "verification") {

tasks.register("ktlintCheck", JavaExec) {
group = "verification"
description = "Check Kotlin code style."
main = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "src/**/*.kt"
mainClass = "com.pinterest.ktlint.Main"
// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information
args "src/**/*.kt", "**.kts", "!**/build/**"
}
check.dependsOn ktlint

task ktlintFormat(type: JavaExec, group: "formatting") {
tasks.named("check") {
dependsOn tasks.named("ktlintCheck")
}

tasks.register("ktlintFormat", JavaExec) {
group = "formatting"
description = "Fix Kotlin code style deviations."
main = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
}
mainClass = "com.pinterest.ktlint.Main"
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED"
// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information
args "-F", "src/**/*.kt", "**.kts", "!**/build/**"
}
5,053 changes: 5,053 additions & 0 deletions app/lint-report.html

Large diffs are not rendered by default.

424 changes: 424 additions & 0 deletions app/lint-report.xml

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions app/lint-results.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/presenter/activities/DisabledActivity.java:119: Error: Overriding method should call super.onBackPressed [MissingSuperCall]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/presenter/activities/camera/ScanQRActivity.java:122: Error: Overriding method should call super.onRequestPermissionsResult [MissingSuperCall]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/presenter/activities/settings/DisplayCurrencyActivity.java:62: Error: @layout/activity_display_currency does not contain a declaration with id faq_button [MissingInflatedId]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/presenter/fragments/FragmentTransactionDetails.java:39: Error: @layout/fragment_transaction_details does not contain a declaration with id title [MissingInflatedId]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/presenter/activities/settings/SyncBlockchainActivity.java:143: Error: @layout/activity_sync_blockchain does not contain a declaration with id close_button [MissingInflatedId]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/AndroidManifest.xml:21: Error: Permission is only granted to system apps [ProtectedPermissions]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/AndroidManifest.xml:24: Error: Permission is only granted to system apps [ProtectedPermissions]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/data_binding_base_class_source_out/litewalletDebug/out/com/breadwallet/databinding/ChangeLanguageBottomSheetBinding.java:53: Error: ViewDataBinding.inflateInternal can only be called from within the same library group (referenced groupId=androidx.databinding from groupId=litewallet-android) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/data_binding_base_class_source_out/litewalletDebug/out/com/breadwallet/databinding/ChangeLanguageBottomSheetBinding.java:72: Error: ViewDataBinding.inflateInternal can only be called from within the same library group (referenced groupId=androidx.databinding from groupId=litewallet-android) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/source/kapt/litewalletDebug/androidx/databinding/DataBinderMapperImpl.java:3: Error: MergedDataBinderMapper can only be accessed from within the same library (androidx.databinding:databinding-runtime) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/source/kapt/litewalletDebug/androidx/databinding/DataBinderMapperImpl.java:5: Error: MergedDataBinderMapper.addMapper can only be called from within the same library (androidx.databinding:databinding-runtime) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/source/kapt/litewalletDebug/com/breadwallet/DataBinderMapperImpl.java:21: Error: DataBinderMapper can only be accessed from within the same library (androidx.databinding:databinding-runtime) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/source/kapt/litewalletDebug/com/breadwallet/DataBinderMapperImpl.java:34: Error: DataBinderMapper.getDataBinder can only be called from within the same library (androidx.databinding:databinding-runtime) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/source/kapt/litewalletDebug/com/breadwallet/DataBinderMapperImpl.java:60: Error: DataBinderMapper.getDataBinder can only be called from within the same library (androidx.databinding:databinding-runtime) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/source/kapt/litewalletDebug/com/breadwallet/DataBinderMapperImpl.java:77: Error: DataBinderMapper.getLayoutId can only be called from within the same library (androidx.databinding:databinding-runtime) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/source/kapt/litewalletDebug/com/breadwallet/DataBinderMapperImpl.java:86: Error: DataBinderMapper.convertBrIdToString can only be called from within the same library (androidx.databinding:databinding-runtime) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/source/kapt/litewalletDebug/com/breadwallet/DataBinderMapperImpl.java:92: Error: DataBinderMapper.collectDependencies can only be called from within the same library (androidx.databinding:databinding-runtime) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/data_binding_base_class_source_out/litewalletDebug/out/com/breadwallet/databinding/FragmentHistoryBinding.java:48: Error: ViewDataBinding.inflateInternal can only be called from within the same library group (referenced groupId=androidx.databinding from groupId=litewallet-android) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/build/generated/data_binding_base_class_source_out/litewalletDebug/out/com/breadwallet/databinding/FragmentHistoryBinding.java:67: Error: ViewDataBinding.inflateInternal can only be called from within the same library group (referenced groupId=androidx.databinding from groupId=litewallet-android) [RestrictedApi]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:379: Error: Wrong argument count, format string timber: onTxAdded: tx.length: %d, blockHeight: %d, timestamp: %d, amount: %d, hash: %s requires 5 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:379: Error: Wrong argument count, format string timber: onTxAdded: tx.length: %d, blockHeight: %d, timestamp: %d, amount: %d, hash: %s requires 5 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:379: Error: Wrong argument count, format string timber: onTxAdded: tx.length: %d, blockHeight: %d, timestamp: %d, amount: %d, hash: %s requires 5 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:379: Error: Wrong argument count, format string timber: onTxAdded: tx.length: %d, blockHeight: %d, timestamp: %d, amount: %d, hash: %s requires 5 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:379: Error: Wrong argument count, format string timber: onTxAdded: tx.length: %d, blockHeight: %d, timestamp: %d, amount: %d, hash: %s requires 5 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:433: Error: Wrong argument count, format string timber: onTxUpdated: hash: %s, blockHeight: %d, timestamp: %d requires 3 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:433: Error: Wrong argument count, format string timber: onTxUpdated: hash: %s, blockHeight: %d, timestamp: %d requires 3 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:433: Error: Wrong argument count, format string timber: onTxUpdated: hash: %s, blockHeight: %d, timestamp: %d requires 3 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:444: Error: Wrong argument count, format string timber: onTxDeleted: hash: %s, notifyUser: %d, recommendRescan: %d requires 3 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:444: Error: Wrong argument count, format string timber: onTxDeleted: hash: %s, notifyUser: %d, recommendRescan: %d requires 3 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
/Users/grunt/crypto_projects/lf-projects/litewallet-android/app/src/main/java/com/breadwallet/wallet/BRWalletManager.java:444: Error: Wrong argument count, format string timber: onTxDeleted: hash: %s, notifyUser: %d, recommendRescan: %d requires 3 but format call supplies 0 [TimberArgCount from jetified-timber-4.7.1]
30 errors, 0 warnings
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<activity
android:name=".presenter.activities.AnnounceUpdatesViewActivity"
android:exported="false"
android:label="@string/title_activity_announce_updates_view"
android:label="Litewallet"
android:theme="@style/AppTheme" />
<activity
android:name=".presenter.activities.intro.IntroActivity"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/breadwallet/di/module/AppModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import javax.inject.Singleton
*/
@Module
class AppModule(val app: BreadApp) {

@Provides
@Singleton
fun provideApplication() = app
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/breadwallet/entities/CountryAudio.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package com.breadwallet.entities
annotation class AudioRes

data class CountryAudio(
val langDescription : String,
val langQuestion : String,
@AudioRes val langAudio : Int
)
val langDescription: String,
val langQuestion: String,
@AudioRes val langAudio: Int,
)
8 changes: 3 additions & 5 deletions app/src/main/java/com/breadwallet/entities/IntroLanguage.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.breadwallet.entities

import android.net.Uri

data class IntroLanguage(
val lang : String,
val desc : String,
val audio : Int,
val lang: String,
val desc: String,
val audio: Int,
val message: String,
)
77 changes: 63 additions & 14 deletions app/src/main/java/com/breadwallet/entities/IntroLanguageResource.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,71 @@ package com.breadwallet.entities
import com.breadwallet.R

class IntroLanguageResource {

fun loadResources() : Array<IntroLanguage>{
return arrayOf<IntroLanguage> (
IntroLanguage(Language.ENGLISH.title, "The most secure and safest way to use Litecoin.", R.raw.english, "Are you sure you want to change the language to English?"),
IntroLanguage(Language.SPANISH.title, "La forma más segura de usar Litecoin.", R.raw.spanish, "¿Estás seguro de que quieres cambiar el idioma a español?"),
IntroLanguage(Language.INDONESIAN.title, "Cara paling aman dan teraman untuk menggunakan Litecoin.", R.raw.bahasaindonesia, "Yakin ingin mengubah bahasanya ke bahasa Indonesia?"),
IntroLanguage(Language.GERMAN.title, "Die sicherste Option zur Nutzung von Litecoin.", R.raw.deutsch, "Sind Sie sicher, dass Sie die Sprache auf Deutsch ändern möchten?"),
IntroLanguage(Language.UKRAINIAN.title, "Найбезпечніший і найбезпечніший спосіб використання Litecoin.", R.raw.ukrainian, "Ви впевнені, що хочете змінити мову на українську?"),
fun loadResources(): Array<IntroLanguage> {
return arrayOf<IntroLanguage>(
IntroLanguage(
Language.ENGLISH.title,
"The most secure and safest way to use Litecoin.",
R.raw.english,
"Are you sure you want to change the language to English?",
),
IntroLanguage(
Language.SPANISH.title,
"La forma más segura de usar Litecoin.",
R.raw.spanish,
"¿Estás seguro de que quieres cambiar el idioma a español?",
),
IntroLanguage(
Language.INDONESIAN.title,
"Cara paling aman dan teraman untuk menggunakan Litecoin.",
R.raw.bahasaindonesia,
"Yakin ingin mengubah bahasanya ke bahasa Indonesia?",
),
IntroLanguage(
Language.GERMAN.title,
"Die sicherste Option zur Nutzung von Litecoin.",
R.raw.deutsch,
"Sind Sie sicher, dass Sie die Sprache auf Deutsch ändern möchten?",
),
IntroLanguage(
Language.UKRAINIAN.title,
"Найбезпечніший і найбезпечніший спосіб використання Litecoin.",
R.raw.ukrainian,
"Ви впевнені, що хочете змінити мову на українську?",
),
IntroLanguage(Language.CHINESE_TRADITIONAL.title, "使用萊特幣最安全、最有保障的方式。", R.raw.traditionalchinese, "您確定要將語言改為中文嗎?"),
IntroLanguage(Language.ITALIAN.title, "Il modo più sicuro per usare i Litecoin.", R.raw.italiano, "Sei sicuro di voler cambiare la lingua in italiano?"),
IntroLanguage(
Language.ITALIAN.title,
"Il modo più sicuro per usare i Litecoin.",
R.raw.italiano,
"Sei sicuro di voler cambiare la lingua in italiano?",
),
IntroLanguage(Language.KOREAN.title, "Litecoin을 사용하는 가장 안정되고 안전한 방법.", R.raw.korean, "언어를 한국어로 변경하시겠습니까?"),
IntroLanguage(Language.FRENCH.title, "La façon la plus sécurisée et sûre d'utiliser Litecoin.", R.raw.french, "Êtes-vous sûr de vouloir changer la langue en français ?"),
IntroLanguage(Language.TURKISH.title, "Litecoin'i kullanmanın en güvenli ve en güvenli yolu.", R.raw.turkish, "Dili türkçeye değiştirmek istediğinizden emin misiniz?"),
IntroLanguage(
Language.FRENCH.title,
"La façon la plus sécurisée et sûre d'utiliser Litecoin.",
R.raw.french,
"Êtes-vous sûr de vouloir changer la langue en français ?",
),
IntroLanguage(
Language.TURKISH.title,
"Litecoin'i kullanmanın en güvenli ve en güvenli yolu.",
R.raw.turkish,
"Dili türkçeye değiştirmek istediğinizden emin misiniz?",
),
IntroLanguage(Language.JAPANESE.title, "最も安全にリテコインを使う手段。", R.raw.japanese, "言語を日本語に変更してもよろしいですか?"),
IntroLanguage(Language.PORTUGUESE.title, "A forma mais protegida e segura de utilizar a Litecoin.", R.raw.portugues, "Tem certeza de que deseja alterar o idioma para português?"),
IntroLanguage(Language.RUSSIAN.title, "Самый надежный и безопасный способ использования биткойна.", R.raw.russian, "Вы уверены, что хотите сменить язык на русский?")
IntroLanguage(
Language.PORTUGUESE.title,
"A forma mais protegida e segura de utilizar a Litecoin.",
R.raw.portugues,
"Tem certeza de que deseja alterar o idioma para português?",
),
IntroLanguage(
Language.RUSSIAN.title,
"Самый надежный и безопасный способ использования биткойна.",
R.raw.russian,
"Вы уверены, что хотите сменить язык на русский?",
),
)
}
}
}
12 changes: 5 additions & 7 deletions app/src/main/java/com/breadwallet/entities/Language.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package com.breadwallet.entities

import com.breadwallet.R
import java.util.Locale


/** Litewallet
* Created by Mohamed Barry on 7/19/21
* email: [email protected]
Expand All @@ -12,8 +8,8 @@ import java.util.Locale
enum class Language(
val code: String,
val title: String,
val desc: String
) {
val desc: String,
) {
ENGLISH("en", "English", "Select language"),
GERMAN("de", "Deutsch", "Sprache auswählen"),
SPANISH("es", "Español", "Seleccione el idioma"),
Expand All @@ -27,7 +23,9 @@ enum class Language(
KOREAN("ko", "한국어", "언어 선택"),
JAPANESE("ja", "日本語", "言語を選択する"),
CHINESE_SIMPLIFIED("zh-CN", "简化字", "选择语言"),
CHINESE_TRADITIONAL("zh-TW", "繁體字", "選擇語言");
CHINESE_TRADITIONAL("zh-TW", "繁體字", "選擇語言"),
;

companion object {
fun find(code: String?): Language = values().find { it.code == code } ?: ENGLISH
}
Expand Down
Loading

0 comments on commit 265ee74

Please sign in to comment.