diff options
author | Allan Wang <me@allanwang.ca> | 2020-10-03 20:00:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 20:00:56 -0700 |
commit | a1e962c1a1e004fb371a11b2bde6ad6a7c395e0f (patch) | |
tree | 0c14b3b67216756e61f092d563cb960b356beff8 | |
parent | bcd70cc6e8eca159fbefd82991817bf3ce4b4d2b (diff) | |
parent | 50e76bb665039017f0961b1cfda5acf45fff903c (diff) | |
download | frost-a1e962c1a1e004fb371a11b2bde6ad6a7c395e0f.tar.gz frost-a1e962c1a1e004fb371a11b2bde6ad6a7c395e0f.tar.bz2 frost-a1e962c1a1e004fb371a11b2bde6ad6a7c395e0f.zip |
Merge pull request #1717 from AllanWang/versions
-rw-r--r-- | app/src/main/AndroidManifest.xml | 1 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt | 18 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt | 9 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt | 4 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt | 4 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt | 4 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/Versions.kt | 4 | ||||
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | spotless.gradle | 2 |
9 files changed, 25 insertions, 23 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 34ce0f49..27713c38 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -25,6 +25,7 @@ android:supportsRtl="true" android:theme="@style/FrostTheme" android:usesCleartextTraffic="true" + android:requestLegacyExternalStorage="true" tools:ignore="UnusedAttribute"> <!-- Matches general label under NotificationUtils.kt --> <meta-data diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt index 758f719f..38d0dd5c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt @@ -135,19 +135,19 @@ class FrostApp : Application(), KoinComponent { val config = Configuration("83cf680ed01a6fda10fe497d1c0962bb").apply { appVersion = version.versionName releaseStage = BuildUtils.getStage(BuildConfig.BUILD_TYPE) - notifyReleaseStages = BuildUtils.getAllStages() - autoCaptureSessions = prefs.analytics - enableExceptionHandler = prefs.analytics + enabledReleaseStages = BuildUtils.getAllStages() + autoTrackSessions = prefs.analytics + autoDetectErrors = prefs.analytics } - Bugsnag.init(this, config) + Bugsnag.start(this, config) L.hasAnalytics = { prefs.analytics } - Bugsnag.setUserId(prefs.frostId) - Bugsnag.addToTab("Build", "Application", BuildConfig.APPLICATION_ID) - Bugsnag.addToTab("Build", "Version", BuildConfig.VERSION_NAME) + Bugsnag.setUser(prefs.frostId, null, null) + Bugsnag.addMetadata("Build", "Application", BuildConfig.APPLICATION_ID) + Bugsnag.addMetadata("Build", "Version", BuildConfig.VERSION_NAME) - Bugsnag.beforeNotify { error -> + Bugsnag.addOnError { event -> when { - error.exception.stackTrace.any { it.className.contains("XposedBridge") } -> false + event.originalError?.stackTrace?.any { it.className.contains("XposedBridge") } == true -> false else -> true } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt index 7a54a567..a012c426 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt @@ -178,10 +178,11 @@ class AboutActivity : AboutActivityBase(null) { arrayOf(R.drawable.ic_fdroid_24 to { c.startLink(R.string.fdroid_url) }) val iicons: Array<Pair<IIcon, () -> Unit>> = arrayOf( GoogleMaterial.Icon.gmd_file_download to { c.startLink(R.string.github_downloads_url) }, - CommunityMaterial.Icon2.cmd_reddit to { c.startLink(R.string.reddit_url) }, - CommunityMaterial.Icon.cmd_github_circle to { c.startLink(R.string.github_url) }, - CommunityMaterial.Icon2.cmd_slack to { c.startLink(R.string.slack_url) }, - CommunityMaterial.Icon2.cmd_xda to { c.startLink(R.string.xda_url) }) + CommunityMaterial.Icon3.cmd_reddit to { c.startLink(R.string.reddit_url) }, + CommunityMaterial.Icon2.cmd_github to { c.startLink(R.string.github_url) }, + CommunityMaterial.Icon3.cmd_slack to { c.startLink(R.string.slack_url) } +// CommunityMaterial.Icon3.cmd_xda to { c.startLink(R.string.xda_url) }, // TODO add back? + ) images = (icons.map { (icon, onClick) -> c.drawable(icon) to onClick } + iicons.map { (icon, onClick) -> diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt index ef5b0b85..a016ca22 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt @@ -153,7 +153,7 @@ class SettingsActivity : KPrefActivity() { subItems(R.string.newsfeed, getFeedPrefs()) { descRes = R.string.newsfeed_desc - iicon = CommunityMaterial.Icon2.cmd_newspaper + iicon = CommunityMaterial.Icon3.cmd_newspaper } subItems(R.string.notifications, getNotificationPrefs()) { @@ -196,7 +196,7 @@ class SettingsActivity : KPrefActivity() { subItems(R.string.experimental, getExperimentalPrefs()) { descRes = R.string.experimental_desc - iicon = CommunityMaterial.Icon.cmd_flask_outline + iicon = CommunityMaterial.Icon2.cmd_flask_outline } subItems(R.string.debug_frost, getDebugPrefs()) { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt index 1a93393b..4c33fe8d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt @@ -40,7 +40,7 @@ enum class FbItem( BIRTHDAYS(R.string.birthdays, GoogleMaterial.Icon.gmd_cake, "events/birthdays"), CHAT(R.string.chat, GoogleMaterial.Icon.gmd_chat, "buddylist"), EVENTS(R.string.events, GoogleMaterial.Icon.gmd_event_note, "events/upcoming"), - FEED(R.string.feed, CommunityMaterial.Icon2.cmd_newspaper, ""), + FEED(R.string.feed, CommunityMaterial.Icon3.cmd_newspaper, ""), FEED_MOST_RECENT(R.string.most_recent, GoogleMaterial.Icon.gmd_history, "home.php?sk=h_chr"), FEED_TOP_STORIES(R.string.top_stories, GoogleMaterial.Icon.gmd_star, "home.php?sk=h_nor"), FRIENDS(R.string.friends, GoogleMaterial.Icon.gmd_person_add, "friends/center/requests"), @@ -48,7 +48,7 @@ enum class FbItem( MARKETPLACE(R.string.marketplace, GoogleMaterial.Icon.gmd_store, "marketplace"), MENU(R.string.menu, GoogleMaterial.Icon.gmd_menu, "settings"), MESSAGES(R.string.messages, MaterialDesignIconic.Icon.gmi_comments, "messages"), - NOTES(R.string.notes, CommunityMaterial.Icon2.cmd_note, "notes"), + NOTES(R.string.notes, CommunityMaterial.Icon3.cmd_note, "notes"), NOTIFICATIONS(R.string.notifications, MaterialDesignIconic.Icon.gmi_globe, "notifications"), ON_THIS_DAY(R.string.on_this_day, GoogleMaterial.Icon.gmd_today, "onthisday"), PAGES(R.string.pages, GoogleMaterial.Icon.gmd_flag, "pages"), diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt index 65ef3056..d922ff54 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt @@ -33,8 +33,8 @@ object BuildUtils { return Data("v${result[1]}", result[2]) } - fun getAllStages(): Array<String> = - arrayOf(BUILD_PRODUCTION, BUILD_TEST, BUILD_GITHUB, BUILD_RELEASE, BUILD_UNNAMED) + fun getAllStages(): Set<String> = + setOf(BUILD_PRODUCTION, BUILD_TEST, BUILD_GITHUB, BUILD_RELEASE, BUILD_UNNAMED) fun getStage(build: String): String = build.takeIf { it in getAllStages() } ?: BUILD_UNNAMED } diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index cf697cea..6ed9d7b9 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -14,11 +14,11 @@ object Versions { // https://github.com/jhy/jsoup/releases const val jsoup = "1.13.1" // https://square.github.io/okhttp/changelog/ - const val okhttp = "4.7.2" + const val okhttp = "4.9.0" // https://developer.android.com/jetpack/androidx/releases/room const val room = "2.2.5" // http://robolectric.org/getting-started/ - const val roboelectric = "4.3" + const val roboelectric = "4.4" // https://github.com/davemorrissey/subsampling-scale-image-view#quick-start const val scaleImageView = "3.10.0" // https://github.com/node-gradle/gradle-node-plugin/releases diff --git a/gradle.properties b/gradle.properties index 2435a418..2120a143 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,7 @@ org.gradle.daemon = true APP_ID=Frost APP_GROUP=com.pitchedapps -KAU=c01c9d5 +KAU=61eeb7b android.useAndroidX=true android.enableJetifier=true diff --git a/spotless.gradle b/spotless.gradle index 22dba3a8..29474895 100644 --- a/spotless.gradle +++ b/spotless.gradle @@ -1,4 +1,4 @@ -apply plugin: "com.diffplug.gradle.spotless" +apply plugin: "com.diffplug.spotless" spotless { kotlin { |