Clear most build warnings (#187)

* Clear the warns build

* Supress inline CurrencyFormatter.kt and Twig.kt
Add FlowPreview into bulild.grandle
Minor change

* Add supres inline at the file level

* Add suppress inline at the file level
This commit is contained in:
Eljo Prifti 2020-12-04 15:28:55 +01:00 committed by GitHub
parent 44477a4e1c
commit ce161d5660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 2 deletions

View File

@ -135,6 +135,14 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// ExperimentalCoroutinesApi and FlowPreview help to clear the build warnings
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.FlowPreview"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'

View File

@ -1,3 +1,5 @@
@file:Suppress("NOTHING_TO_INLINE")
package cash.z.ecc.android.sdk.ext
import cash.z.ecc.android.sdk.ext.Conversions.USD_FORMATTER

View File

@ -1,5 +1,6 @@
package cash.z.ecc.android.sdk.ext
@file:Suppress("NOTHING_TO_INLINE")
package cash.z.ecc.android.sdk.ext
import java.util.concurrent.CopyOnWriteArraySet
import kotlin.math.roundToLong

View File

@ -175,7 +175,7 @@ class WalletTransactionEncoder(
if (response.isSuccessful) {
twig("fetch succeeded")
val file = File(destinationDir, paramFileName)
if(file.parentFile.exists()) {
if(file.parentFile?.exists() == true) {
twig("directory exists!")
} else {
twig("directory did not exist attempting to make it")