Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NO-TICKET - Updated libs and moved all them to [Dependencies.kt] #1900

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .scripts/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ ext {

// https://github.com/shyiko/ktlint
ktlintVersion = '0.45.2'

kotlinVersion = '1.7.20'
}
156 changes: 49 additions & 107 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,130 +92,72 @@ dependencies {

implementation(files("libs/borshj-0.0.0.jar"))

Dependencies.baseAndroidLibraries.forEach { implementation(it) }
Dependencies.adapterDelegatesLibraries.forEach { implementation(it) }

implementation("androidx.biometric:biometric:1.1.0")
implementation("androidx.browser:browser:1.4.0")
implementation("org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlinVersion}")

val coroutinesVersion = "1.6.2"
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion")

val work_version = "2.7.1"
implementation("androidx.work:work-runtime-ktx:$work_version")

// https://github.com/dm77/barcodescanner
implementation("me.dm7.barcodescanner:zxing:1.9.8")
// https://github.com/JakeWharton/ThreeTenABP
implementation("com.jakewharton.threetenabp:threetenabp:1.3.0")
implementation(Dependencies.kotlinReflect)

val retrofitVersion = "2.9.0"
implementation("com.squareup.retrofit2:retrofit:$retrofitVersion")
implementation("com.squareup.retrofit2:converter-gson:$retrofitVersion")
implementation("com.squareup.retrofit2:converter-scalars:$retrofitVersion")

val okHttpVersion = "4.9.3"
implementation("com.squareup.okhttp3:okhttp:$okHttpVersion")
implementation("com.squareup.okhttp3:logging-interceptor:$okHttpVersion")
// Android common
Dependencies.baseAndroidLibraries.forEach { implementation(it) }

// Import the BoM for the Firebase platform
implementation(platform("com.google.firebase:firebase-bom:31.1.1"))
// Adapter delegates
Dependencies.adapterDelegatesLibraries.forEach { implementation(it) }

// Declare the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-messaging-ktx")
implementation("com.google.firebase:firebase-config")
// Coroutines
Dependencies.coroutineLibraries.forEach { implementation(it) }

implementation("io.intercom.android:intercom-sdk:14.0.0")
// Retrofit
Dependencies.retrofitLibraries.forEach { implementation(it) }

implementation("com.amplitude:android-sdk:2.35.3")
// Room
implementation(Dependencies.roomRuntime)
implementation(Dependencies.roomKtx)
kapt(Dependencies.roomCompiler)

implementation("com.google.android.gms:play-services-base:18.1.0")
// Firebase
implementation(platform(Dependencies.firebaseBom))
Dependencies.firebaseLibraries.forEach { implementation(it) }

// Debug drawer
val debugDrawerVersion = "0.8.0"
implementation("io.palaima.debugdrawer:debugdrawer-timber:$debugDrawerVersion")
// Google Play
Dependencies.googlePlayLibraries.forEach { implementation(it) }

// Glide
implementation("com.github.bumptech.glide:glide:4.12.0")
kapt("com.github.bumptech.glide:compiler:4.12.0")
implementation("com.caverock:androidsvg-aar:1.4")

// Room
val roomVersion = "2.4.3"
implementation("androidx.room:room-runtime:$roomVersion")
implementation("androidx.room:room-ktx:$roomVersion")
kapt("androidx.room:room-compiler:$roomVersion")
implementation(Dependencies.glide)
implementation(Dependencies.caverockSvg)
kapt(Dependencies.glideCompiler)

// Lottie
val lottieVersion = "4.0.0"
implementation("com.airbnb.android:lottie:$lottieVersion")


implementation(Dependencies.lottie)

// dots indicator
implementation("com.tbuonomo:dotsindicator:4.3")

// Google Play Auth
implementation("com.google.android.gms:play-services-auth:20.3.0")
implementation(Dependencies.dotsIndicator)

// AppsFlyer
implementation("com.appsflyer:af-android-sdk:6.9.0")
implementation("androidx.ads:ads-identifier:1.0.0-alpha04")
implementation("com.android.installreferrer:installreferrer:2.2")

// TickerView
implementation("com.robinhood.ticker:ticker:2.0.4")
implementation("androidx.core:core-splashscreen:1.0.0")

implementation("io.michaelrocks:libphonenumber-android:8.12.52")
Dependencies.appsFlyerLibraries.forEach { implementation(it) }

// Striga SDK https://developers.sumsub.com/msdk/android/changelog.html
implementation ("com.sumsub.sns:idensic-mobile-sdk:1.25.0")

// core
testImplementation("androidx.test:core-ktx:1.5.0")
testImplementation("androidx.test.ext:junit-ktx:1.1.5")
testImplementation("androidx.arch.core:core-testing:2.2.0")
// https://github.com/mockk/mockk
testImplementation("io.mockk:mockk:1.12.0")
// https://mvnrepository.com/artifact/junit/junit
testImplementation("junit:junit:4.13.2")
// https://github.com/robolectric/robolectric
testImplementation("org.robolectric:robolectric:4.7.3")

implementation("com.lokalise.android:sdk:2.1.1") {
isTransitive = true
}
// Coroutines support
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")

// Koin Test features
val koinVersion = "3.2.0"
testImplementation("io.insert-koin:koin-test:$koinVersion")
testImplementation("io.insert-koin:koin-test-junit4:$koinVersion")

testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.25")
testImplementation("org.slf4j:slf4j-nop:1.7.30")

testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")

testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.8.2") {
implementation(Dependencies.strigaSdk)

// Utils
implementation(Dependencies.libphonenumber)
implementation(Dependencies.lokalise) { isTransitive = true }
implementation(Dependencies.workRuntimeKtx)
implementation(Dependencies.barcodeScanner)
implementation(Dependencies.threetenabp)
implementation(Dependencies.intercom)
implementation(Dependencies.amplitude)
implementation(Dependencies.debugDrawer)
implementation(Dependencies.tickerView)

// Core testing
Dependencies.coreTestingLibraries.forEach { testImplementation(it) }

// Koin testing
Dependencies.koinTestingLibraries.forEach { testImplementation(it) }

// Other testing tools
Dependencies.otherTestingLibraries.forEach { testImplementation(it) }

// Runtime only testing tools
implementation(Dependencies.junitPlatform) {
because("This lib comes shipped with the IDE and it possible that newer versions of JUnit 5 maybe be incompatible with the version of junit-platform-launcher shipped with the IDE.")
}
val junitJupiterVersion = "5.8.2"
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:$junitJupiterVersion")

// timezone for unit testing
testImplementation("org.threeten:threetenbp:1.6.8")

// XmlPullParser goes with android.jar and doesn't work in unit tests
testImplementation("xmlpull:xmlpull:1.1.3.4a@jar")
// KXmlParser needs for XmlPullParserFactory
testImplementation("net.sf.kxml:kxml2:2.3.0")
Dependencies.junitRuntimeOnlyLibraries.forEach { testRuntimeOnly(it) }
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ class TokenHistoryFragment :
sellAnalytics.logTokenScreenActionClicked()
replaceFragment(SellPayloadFragment.create())
}
else -> {
// do nothing
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class HistoryAdapter(
is HistoryItem.BridgeSendItem -> {
holder.onBind(item)
}
else -> {
// TODO: WHAT SHOULD BE HERE?
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ class SelectTokenViewHolder(
is Token.Other -> {
endAmountView.isVisible = false
}
is Token.Eth -> {
// do nothing
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ class NewTransactionProgressBottomSheet : BottomSheetDialogFragment() {
is TransactionState.ClaimProgress -> handleClaimProgress(state)
is TransactionState.BridgeSendSuccess -> handleSendSuccess(state)
is TransactionState.Error -> handleError(state)
is TransactionState.JupiterSwapSuccess -> {
// TODO: WHAT SHOULD BE HERE?
}
is TransactionState.JupiterSwapFailed -> {
// TODO: WHAT SHOULD BE HERE?
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ class ProgressBottomSheet : NonDraggableBottomSheetDialogFragment() {
is TransactionState.SendSuccess -> handleSendSuccess(state)
is TransactionState.SwapSuccess -> handleSwapSuccess(state)
is TransactionState.Error -> handleError(state)
is TransactionState.JupiterSwapSuccess -> {
// TODO: WHAT SHOULD BE HERE?
}
is TransactionState.JupiterSwapFailed -> {
// TODO: WHAT SHOULD BE HERE?
}
else -> {
// TODO: WHAT SHOULD BE HERE?
}
}
}
}
Expand Down
53 changes: 0 additions & 53 deletions build.gradle

This file was deleted.

56 changes: 56 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apply {
from("${project.rootDir}/.scripts/dependencies.gradle")
from("${project.rootDir}/.scripts/changelog.gradle")
}

buildscript {

repositories {
google()
mavenCentral()
maven(url = "https://maven.google.com/")
maven(url = "https://jitpack.io/")
}

dependencies {
classpath("com.android.tools.build:gradle:${Versions.buildGradleVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlinGradlePluginVersion}")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.6")
classpath("com.google.gms:google-services:4.3.15")
}
}

allprojects {
repositories {
google()
mavenCentral()
maven(url = "https://jitpack.io/")
maven(url = "https://maven.google.com/")
maven(url = "https://maven.lokalise.com/")
maven(url = "https://maven.sumsub.com/repository/maven-public/")
}
}

tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}

tasks.register<Copy>("installGitHook") {
val useGitHooks = extra["use_git_hooks"]?.toString()?.toBoolean() ?: false

logger.quiet("(GIT_HOOKS): use_git_hooks=$useGitHooks")
if (useGitHooks) {
from(rootProject.file("scripts/pre-commit"))
into(rootProject.file(".git/hooks"))
// Set file mode to executable
rootProject.file(".git/hooks/pre-commit").setExecutable(true)
} else {
rootProject.file(".git/hooks/pre-commit").delete()
}
}

gradle.projectsEvaluated {
tasks.withType<JavaCompile> {
dependsOn("installGitHook")
}
}
6 changes: 2 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ tasks.withType<KotlinCompile>().configureEach {

dependencies {
implementation(gradleApi())
implementation("com.android.tools.build:gradle:7.3.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
implementation("com.android.tools.build:gradle:7.3.1")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
implementation("com.google.firebase:firebase-appdistribution-gradle:3.2.0")
implementation("com.google.firebase:perf-plugin:1.4.2")
}
Loading
Loading