Skip to content

Commit 349603b

Browse files
JunkFood02Ashinch
authored andcommitted
build(deps): bump up dependencies, compile sdk, and gradle version (#502)
* build(deps): bump up dependencies, compile sdk, and gradle version * build(deps): remove redundant safe-args plugin * build(deps): update Compose BOM to `2024.01.00` & compiler to `1.5.8`
1 parent 6176a78 commit 349603b

File tree

7 files changed

+71
-39
lines changed

7 files changed

+71
-39
lines changed

app/build.gradle

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
id "org.jetbrains.kotlin.android"
44
id "kotlin-kapt"
55
id "dagger.hilt.android.plugin"
6-
id "androidx.navigation.safeargs.kotlin"
6+
id "com.google.dagger.hilt.android"
77
}
88

99
def gitCommitHash = "git rev-parse --verify --short HEAD".execute().text.trim()
@@ -15,7 +15,7 @@ if (keyPropsFile.exists()) {
1515
}
1616

1717
android {
18-
compileSdk 33
18+
compileSdk 34
1919

2020
defaultConfig {
2121
applicationId "me.ash.reader"
@@ -60,6 +60,9 @@ android {
6060
storePassword keyProps["storePassword"]
6161
}
6262
}
63+
lint {
64+
disable += "MissingTranslation"
65+
}
6366
buildTypes {
6467
release {
6568
minifyEnabled true
@@ -87,7 +90,7 @@ android {
8790
compose true
8891
}
8992
composeOptions {
90-
kotlinCompilerExtensionVersion compose
93+
kotlinCompilerExtensionVersion '1.5.8'
9194
}
9295
packagingOptions {
9396
resources {
@@ -161,36 +164,39 @@ dependencies {
161164
implementation "androidx.compose.material3:material3:$material3"
162165

163166
// https://github.com/google/accompanist/releases
164-
implementation "com.google.accompanist:accompanist-insets:$accompanist"
165167
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist"
166168
implementation "com.google.accompanist:accompanist-pager:$accompanist"
167169
implementation "com.google.accompanist:accompanist-flowlayout:$accompanist"
168170
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist"
169171
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist"
170172

173+
implementation platform("androidx.compose:compose-bom:$composeBom")
174+
androidTestImplementation(platform("androidx.compose:compose-bom:$composeBom"))
175+
171176
// https://developer.android.com/jetpack/androidx/releases/compose-animation
172-
implementation "androidx.compose.animation:animation-graphics:$compose"
177+
implementation "androidx.compose.animation:animation-graphics"
173178
// https://developer.android.com/jetpack/androidx/releases/compose-ui
174-
implementation "androidx.compose.ui:ui:$compose"
175-
implementation "androidx.compose.ui:ui-util:$compose"
179+
implementation "androidx.compose.ui:ui"
180+
implementation "androidx.compose.ui:ui-util"
176181
// https://developer.android.com/jetpack/androidx/releases/compose-material
177-
implementation "androidx.compose.material:material:$compose"
178-
implementation "androidx.compose.material:material-icons-extended:$compose"
179-
debugImplementation "androidx.compose.ui:ui-tooling:$compose"
180-
implementation "androidx.compose.ui:ui-tooling-preview:$compose"
181-
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose"
182+
implementation "androidx.compose.material:material"
183+
implementation "androidx.compose.material:material-icons-extended"
184+
debugImplementation "androidx.compose.ui:ui-tooling"
185+
implementation "androidx.compose.ui:ui-tooling-preview"
186+
187+
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
182188

183189
// hilt
184-
implementation "androidx.hilt:hilt-work:1.0.0"
185-
implementation "com.google.dagger:hilt-android:2.40.5"
186-
kapt "com.google.dagger:hilt-android-compiler:2.40.5"
187-
implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03"
188-
kapt "androidx.hilt:hilt-compiler:1.0.0"
189-
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
190+
implementation "androidx.hilt:hilt-work:1.1.0"
191+
implementation "com.google.dagger:hilt-android:2.50"
192+
kapt "com.google.dagger:hilt-android-compiler:2.50"
193+
// implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03"
194+
kapt "androidx.hilt:hilt-compiler:1.1.0"
195+
implementation "androidx.hilt:hilt-navigation-compose:1.1.0"
190196

191197
// android
192-
implementation "androidx.core:core-ktx:1.7.0"
193-
implementation "androidx.activity:activity-compose:1.4.0"
198+
implementation "androidx.core:core-ktx:1.12.0"
199+
implementation "androidx.activity:activity-compose:1.8.2"
194200
testImplementation "junit:junit:4.13.2"
195201
androidTestImplementation "androidx.test.ext:junit:1.1.3"
196202
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"

app/proguard-rules.pro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@
3636

3737
# Provider API
3838
-keep class me.ash.reader.infrastructure.** { *; }
39+
40+
# https://github.com/flutter/flutter/issues/127388
41+
-dontwarn org.kxml2.io.KXml**
42+
43+
# https://youtrack.jetbrains.com/issue/KTOR-5528
44+
-dontwarn org.slf4j.impl.StaticLoggerBinder

app/src/main/java/me/ash/reader/infrastructure/android/NotificationHelper.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
package me.ash.reader.infrastructure.android
22

3+
import android.Manifest
34
import android.app.*
45
import android.content.Context
56
import android.content.Intent
7+
import android.content.pm.PackageManager
68
import android.graphics.BitmapFactory
9+
import androidx.core.app.ActivityCompat
710
import androidx.core.app.NotificationCompat
811
import androidx.core.app.NotificationManagerCompat
912
import dagger.hilt.android.qualifiers.ApplicationContext
@@ -69,6 +72,16 @@ class NotificationHelper @Inject constructor(
6972
.setSummaryText(feedWithArticle.feed.name)
7073
)
7174

75+
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
76+
// TODO: Consider calling
77+
// ActivityCompat#requestPermissions
78+
// here to request the missing permissions, and then overriding
79+
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
80+
// int[] grantResults)
81+
// to handle the case where the user grants the permission. See the documentation
82+
// for ActivityCompat#requestPermissions for more details.
83+
return
84+
}
7285
notificationManager.notify(
7386
Random().nextInt() + article.id.hashCode(),
7487
builder.build().apply {

app/src/main/java/me/ash/reader/ui/page/home/flow/SearchBar.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,13 @@ fun SearchBar(
6262
.height(56.dp)
6363
.fillMaxWidth()
6464
.focusRequester(focusRequester),
65-
colors = TextFieldDefaults.textFieldColors(
66-
textColor = MaterialTheme.colorScheme.onSurfaceVariant,
67-
containerColor = Color.Transparent,
68-
focusedIndicatorColor = Color.Transparent,
69-
unfocusedIndicatorColor = Color.Transparent,
65+
colors = TextFieldDefaults.colors(
66+
unfocusedTextColor = MaterialTheme.colorScheme.onSurfaceVariant,
67+
focusedContainerColor = Color.Transparent,
68+
unfocusedContainerColor = Color.Transparent,
69+
disabledContainerColor = Color.Transparent,
70+
focusedIndicatorColor = Color.Transparent,
71+
unfocusedIndicatorColor = Color.Transparent,
7072
),
7173
value = value,
7274
onValueChange = { onValueChange(it) },

build.gradle

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
buildscript {
22
ext {
3-
// https://developer.android.com/jetpack/androidx/releases/compose-ui
4-
compose = '1.2.0-beta02'
3+
// https://developer.android.com/jetpack/androidx/releases/compose-ui
4+
// compose = '1.2.0-beta02'
5+
// https://developer.android.com/jetpack/compose/bom
6+
composeBom = '2024.01.00'
57
// https://github.com/google/accompanist/releases
6-
accompanist = '0.24.7-alpha'
8+
accompanist = '0.34.0'
79
// https://developer.android.com/jetpack/androidx/releases/compose-material3
8-
material3 = '1.0.1'
10+
material3 = '1.1.2'
911
// https://developer.android.com/jetpack/androidx/releases/lifecycle
10-
lifecycle = '2.5.0-rc01'
12+
lifecycle = '2.6.2'
1113
// https://developer.android.com/jetpack/androidx/releases/navigation
1214
navigation = '2.5.0-rc01'
1315
// https://developer.android.com/jetpack/androidx/releases/paging
1416
paging = '3.1.1'
1517
// https://developer.android.com/jetpack/androidx/releases/room
16-
room = '2.5.0-alpha01'
18+
room = '2.6.1'
1719
// https://developer.android.com/jetpack/androidx/releases/datastore
1820
datastore = '1.0.0'
1921
// https://developer.android.com/jetpack/androidx/releases/work
2022
work = '2.8.0-alpha02'
2123
// https://developer.android.com/jetpack/androidx/releases/profileinstaller
2224
profileinstaller = '1.2.0-beta02'
2325
// https://square.github.io/okhttp/changelogs/changelog/
24-
okhttp = '5.0.0-alpha.7'
26+
okhttp = '5.0.0-alpha.12'
2527
retrofit2 = '2.9.0'
2628
// https://coil-kt.github.io/coil/changelog/
27-
coil = '2.1.0'
29+
coil = '2.5.0'
2830
// https://mvnrepository.com/artifact/com.rometools/rome
2931
rome = '1.18.0'
3032
// https://github.com/dankito/Readability4J
@@ -36,15 +38,14 @@ buildscript {
3638
}
3739

3840
dependencies {
39-
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.40.1'
40-
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.0-alpha01"
41+
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.50'
4142
}
4243
}
4344

4445
plugins {
45-
id 'com.android.application' version '7.4.1' apply false
46-
id 'com.android.library' version '7.4.1' apply false
47-
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
46+
id 'com.android.application' version '8.2.1' apply false
47+
id 'com.android.library' version '8.2.1' apply false
48+
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
4849
}
4950

5051
task clean(type: Delete) {

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ org.gradle.daemon=true
22
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -XX:+UseParallelGC
33
org.gradle.parallel=true
44
android.useAndroidX=true
5+
android.defaults.buildfeatures.buildconfig=true
6+
android.nonTransitiveRClass=false
7+
android.nonFinalResIds=false
8+
android.enableR8.fullMode=false
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Wed Apr 20 21:38:37 CST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)