From 98e7857d8b0057a328c68559d809c3f663d81217 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 2 Mar 2020 00:10:29 -0800 Subject: Update tasks and apply spotless --- app/build.gradle | 21 ++++++++++++++++++--- .../pitchedapps/frost/activities/ImageActivity.kt | 10 +++++----- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index fde143ad..3216e238 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -328,14 +328,29 @@ configurations.all { } } -// Validates code and generates apk -// TODO order tasks; though technically it doesn't matter -task createGithubReleaseApk { +task lintGithubReleaseApk { dependsOn 'spotlessCheck' dependsOn 'lintRelease' +} + +task testGithubReleaseApk { dependsOn 'testReleaseUnitTest' dependsOn 'connectedAndroidTest' +} + +task assembleGithubReleaseApk { dependsOn 'assembleRelease' } +// Validates code and generates apk +// TODO order tasks; though technically it doesn't matter +task createGithubReleaseApk { + dependsOn 'lintGithubReleaseApk' + dependsOn 'testGithubReleaseApk' + dependsOn 'assembleGithubReleaseApk' + + tasks.findByName('testGithubReleaseApk').mustRunAfter 'lintGithubReleaseApk' + tasks.findByName('assembleGithubReleaseApk').mustRunAfter 'testGithubReleaseApk' +} + apply plugin: 'com.bugsnag.android.gradle' \ No newline at end of file diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt index b7a95217..4dad1606 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt @@ -67,6 +67,11 @@ import com.pitchedapps.frost.utils.isIndirectImageUrl import com.pitchedapps.frost.utils.logFrostEvent import com.pitchedapps.frost.utils.sendFrostEmail import com.pitchedapps.frost.utils.setFrostColors +import java.io.File +import java.io.FileNotFoundException +import java.io.IOException +import kotlin.math.abs +import kotlin.math.max import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.Deferred import kotlinx.coroutines.Dispatchers @@ -74,11 +79,6 @@ import kotlinx.coroutines.async import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.koin.android.ext.android.inject -import java.io.File -import java.io.FileNotFoundException -import java.io.IOException -import kotlin.math.abs -import kotlin.math.max /** * Created by Allan Wang on 2017-07-15. -- cgit v1.2.3