Skip to content

Commit

Permalink
Update agp 8.3.0 + dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
mopsalarm committed Mar 6, 2024
1 parent 8c80c19 commit 4b56659
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 34 deletions.
23 changes: 11 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}

dependencies {
classpath 'com.google.gms:google-services:4.4.0'
classpath 'com.google.gms:google-services:4.4.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
}
}
Expand Down Expand Up @@ -160,12 +160,12 @@ dependencies {
implementation project(":model")

implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.22"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0"

implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'androidx.browser:browser:1.7.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.browser:browser:1.8.0'
implementation 'androidx.annotation:annotation:1.7.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.7'
Expand All @@ -178,7 +178,7 @@ dependencies {
// implementation 'com.google.guava:listenablefuture:1.0'
implementation 'androidx.paging:paging-runtime:3.2.1'
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation 'com.google.android.ump:user-messaging-platform:2.1.0'
implementation 'com.google.android.ump:user-messaging-platform:2.2.0'

implementation 'androidx.activity:activity-ktx:1.8.2'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
Expand All @@ -189,23 +189,22 @@ dependencies {
implementation 'androidx.fragment:fragment-ktx:1.6.2'

implementation "com.google.android.gms:play-services-ads:22.6.0"
implementation 'com.google.firebase:firebase-analytics:21.5.0'
implementation 'com.google.firebase:firebase-crashlytics:18.6.1'
implementation 'com.google.firebase:firebase-analytics:21.5.1'
implementation 'com.google.firebase:firebase-crashlytics:18.6.2'

implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")

implementation(platform("com.squareup.okhttp3:okhttp-bom:4.10.0"))
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0"))
implementation "com.squareup.okhttp3:okhttp"
implementation "com.squareup.okhttp3:okhttp-dnsoverhttps"
implementation "com.squareup.okhttp3:okhttp-brotli"

implementation "com.squareup.picasso:picasso:2.8"

implementation "com.squareup.moshi:moshi:1.15.0"
implementation "com.squareup.moshi:moshi:1.15.1"

// do not update >= 1.2.12. leads to hundreds of out of memory errors in crashlytics. no idea why.
implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.12"
implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.28"

implementation "com.github.tony19:named-regexp:1.0.0"
implementation "com.pnikosis:materialish-progress:1.7"
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
android:name="com.sec.android.support.multiwindow"
android:value="true" />

<!-- Workaround https://stackoverflow.com/questions/78085458/manifest-merger-failed-with-agp-8-3-0 -->
<property
android:name="android.adservices.AD_SERVICES_CONFIG"
android:resource="@xml/gma_ad_services_config"
tools:replace="android:resource" />

<receiver android:name=".services.InboxNotificationCanceledReceiver" />

<receiver android:name=".services.MessageReplyReceiver" />
Expand Down
46 changes: 34 additions & 12 deletions app/src/main/java/com/pr0gramm/app/ui/InboxActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.pr0gramm.app.services.InboxService
import com.pr0gramm.app.services.ThemeHelper
import com.pr0gramm.app.services.Track
import com.pr0gramm.app.services.UserService
import com.pr0gramm.app.services.config.ConfigService
import com.pr0gramm.app.ui.base.BaseAppCompatActivity
import com.pr0gramm.app.ui.base.bindViews
import com.pr0gramm.app.ui.base.launchWhenCreated
Expand All @@ -27,6 +28,7 @@ import com.pr0gramm.app.util.startActivity
class InboxActivity : BaseAppCompatActivity("InboxActivity") {
private val userService: UserService by instance()
private val inboxService: InboxService by instance()
private val configService: ConfigService by instance()

private val views by bindViews(ActivityInboxBinding::inflate)

Expand All @@ -52,21 +54,31 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") {

tabsAdapter = TabsStateAdapter(this)

InboxType.values().forEach { type ->
val config = configService.config()
InboxType.entries.forEach { type ->
when (type) {
InboxType.PRIVATE -> tabsAdapter.addTab(getString(R.string.inbox_type_private), id = InboxType.PRIVATE) {
InboxType.PRIVATE -> tabsAdapter.addTab(
getString(R.string.inbox_type_private),
id = InboxType.PRIVATE
) {
ConversationsFragment()
}

InboxType.COMMENTS_OUT -> tabsAdapter.addTab(getString(R.string.inbox_type_comments_out), id = InboxType.COMMENTS_OUT) {
InboxType.COMMENTS_OUT -> tabsAdapter.addTab(
getString(R.string.inbox_type_comments_out),
id = InboxType.COMMENTS_OUT
) {
WrittenCommentsFragment()
}

InboxType.ALL -> tabsAdapter.addTab(getString(R.string.inbox_type_all), id = InboxType.ALL) {
GenericInboxFragment()
}

InboxType.COMMENTS_IN -> tabsAdapter.addTab(getString(R.string.inbox_type_comments_in), id = InboxType.COMMENTS_IN) {
InboxType.COMMENTS_IN -> tabsAdapter.addTab(
getString(R.string.inbox_type_comments_in),
id = InboxType.COMMENTS_IN
) {
GenericInboxFragment(GenericInboxFragment.MessageTypeComments)
}

Expand All @@ -81,11 +93,15 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") {
GenericInboxFragment(GenericInboxFragment.MessageTypeNotifications)
}

InboxType.DIGESTS -> tabsAdapter.addTab(
getString(R.string.inbox_type_digests),
id = InboxType.DIGESTS
) {
DigestsFragment()
InboxType.DIGESTS -> {
if (config.showDigestInInbox) {
tabsAdapter.addTab(
getString(R.string.inbox_type_digests),
id = InboxType.DIGESTS
) {
DigestsFragment()
}
}
}
}
}
Expand Down Expand Up @@ -125,9 +141,15 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") {

tabsAdapter.updateTabTitle(InboxType.ALL, titleOf(R.string.inbox_type_all, counts.total))
tabsAdapter.updateTabTitle(InboxType.PRIVATE, titleOf(R.string.inbox_type_private, counts.messages))
tabsAdapter.updateTabTitle(InboxType.NOTIFICATIONS, titleOf(R.string.inbox_type_notifications, counts.notifications))
tabsAdapter.updateTabTitle(
InboxType.NOTIFICATIONS,
titleOf(R.string.inbox_type_notifications, counts.notifications)
)
tabsAdapter.updateTabTitle(InboxType.STALK, titleOf(R.string.inbox_type_stalk, counts.follows))
tabsAdapter.updateTabTitle(InboxType.COMMENTS_IN, titleOf(R.string.inbox_type_comments_in, counts.comments))
tabsAdapter.updateTabTitle(
InboxType.COMMENTS_IN,
titleOf(R.string.inbox_type_comments_in, counts.comments)
)
}
}
}
Expand Down Expand Up @@ -155,7 +177,7 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") {

private fun handleNewIntent(intent: Intent?) {
val extras = intent?.extras ?: return
showInboxType(InboxType.values()[extras.getInt(EXTRA_INBOX_TYPE, 0)])
showInboxType(InboxType.entries[extras.getInt(EXTRA_INBOX_TYPE, 0)])
}

private fun showInboxType(type: InboxType?) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@
<string name="hint_select_download_directory">Please select a download directory from internal storage or sdcard.</string>
<string name="inbox_type_all">All</string>
<string name="inbox_type_stalk">Stalk</string>
<string name="inbox_type_digests">Digests</string>
<string name="inbox_type_digests">Highlights</string>
<string name="inbox_type_notifications">Notifications</string>
<string name="action_to_conversation">Open conversation</string>
<string name="message_type_comment">Comment</string>
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:8.2.2'
classpath 'com.android.tools.build:gradle:8.3.0'
}
}

plugins {
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
id "org.jetbrains.kotlin.kapt" version "1.9.22" apply false
id "com.github.ben-manes.versions" version "0.42.0"
id "com.github.ben-manes.versions" version "0.51.0"
}

dependencyUpdates.resolutionStrategy {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 6 additions & 6 deletions model/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ buildscript {
plugins {
id("com.android.library")
id("kotlin-android")
id("app.cash.sqldelight") version "2.0.0"
id("com.google.devtools.ksp") version "1.9.22-1.0.17"
id("app.cash.sqldelight") version "2.0.1"
id("com.google.devtools.ksp") version "1.9.22-1.0.18"
}

android {
Expand Down Expand Up @@ -53,16 +53,16 @@ repositories {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.22"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0"

implementation "com.squareup.moshi:moshi:1.15.0"
implementation "com.squareup.moshi:moshi:1.15.1"
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.okhttp3:okhttp:4.12.0"

api "app.cash.sqldelight:primitive-adapters:2.0.1"
api "app.cash.sqldelight:android-driver:2.0.1"
api "app.cash.sqldelight:coroutines-extensions-jvm:2.0.1"

ksp "com.squareup.moshi:moshi-kotlin-codegen:1.15.0"
ksp "com.squareup.moshi:moshi-kotlin-codegen:1.15.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ data class Config(
val userClasses: List<UserClass> = DefaultUserClasses,
val endOfLifeAndroidVersion: Int = Build.VERSION_CODES.LOLLIPOP,

val showDigestInInbox: Boolean = false,

// currently not working as they closed their affiliate program.
val reAffiliate: String = "X-IGNORE",

Expand Down

0 comments on commit 4b56659

Please sign in to comment.