Skip to content

Commit

Permalink
bump gradle, agp and deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshgngwr committed Dec 24, 2023
1 parent 262724d commit 96bdf67
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 43 deletions.
22 changes: 11 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ project.afterEvaluate {
}

dependencies {
def androidXHiltVersion = '1.0.0'
def androidXHiltVersion = '1.1.0'
def fragmentVersion = '1.6.1'
def media3Version = '1.1.1'
def roomVersion = '2.5.2'
def workManagerVersion = '2.8.1'
def media3Version = '1.2.0'
def roomVersion = '2.6.1'
def workManagerVersion = '2.9.0'

def espressoVersion = '3.5.1'
def mockkVersion = '1.13.8'
Expand All @@ -104,14 +104,14 @@ dependencies {
ksp "androidx.room:room-compiler:$roomVersion"

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.browser:browser:1.5.0'
implementation 'androidx.browser:browser:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.core:core-ktx:$deps.androidXCoreVersion"
implementation "androidx.fragment:fragment-ktx:$fragmentVersion"
implementation "androidx.hilt:hilt-work:$androidXHiltVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$deps.lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$deps.lifecycleVersion"
implementation 'androidx.media:media:1.6.0' // needed for audio focus management.
implementation 'androidx.media:media:1.7.0' // needed for audio focus management.
implementation "androidx.media3:media3-common:$media3Version"
implementation "androidx.media3:media3-exoplayer:$media3Version"
implementation "androidx.media3:media3-exoplayer-workmanager:$media3Version"
Expand All @@ -120,7 +120,7 @@ dependencies {
implementation "androidx.navigation:navigation-ui-ktx:$deps.navVersion"
implementation 'androidx.paging:paging-runtime-ktx:3.2.1'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation "androidx.room:room-ktx:$roomVersion"
implementation "androidx.room:room-paging:$roomVersion"
implementation "androidx.room:room-runtime:$roomVersion"
Expand All @@ -129,7 +129,7 @@ dependencies {
implementation 'com.caverock:androidsvg-aar:1.4'
implementation 'com.github.AppIntro:AppIntro:6.2.0'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation "com.google.dagger:hilt-android:$deps.hiltVersion"
implementation "com.mikepenz:aboutlibraries:${deps.aboutLibrariesVersion}"
Expand All @@ -138,10 +138,10 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$deps.coroutinesVersion"
implementation project(":api-client")

fullImplementation 'androidx.mediarouter:mediarouter:1.4.0'
fullImplementation 'com.android.billingclient:billing-ktx:6.0.1'
fullImplementation 'androidx.mediarouter:mediarouter:1.6.0'
fullImplementation 'com.android.billingclient:billing-ktx:6.1.0'
fullImplementation 'com.google.android.gms:play-services-base:18.2.0'
fullImplementation 'com.google.android.gms:play-services-cast-framework:21.3.0'
fullImplementation 'com.google.android.gms:play-services-cast-framework:21.4.0'
fullImplementation 'com.google.android.play:core:1.10.3'
fullImplementation platform('com.google.firebase:firebase-bom:31.5.0')

Check warning on line 146 in app/build.gradle

View workflow job for this annotation

GitHub Actions / Lint

Obsolete Gradle Dependency: A newer version of com.google.firebase:firebase-bom than 31.5.0 is available: 32.7.0
fullImplementation 'com.google.firebase:firebase-analytics-ktx'
Expand Down
16 changes: 15 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Expand Down Expand Up @@ -203,7 +209,15 @@

<service android:name=".service.SubscriptionStatusPollService" />

<service android:name=".service.AlarmRingerService" />
<service
android:name=".service.AlarmRingerService"
android:foregroundServiceType="specialUse">

<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="required for showing the alarm ringer UI when a scheduled alarm fires" />

</service>

<receiver
android:name=".receiver.AlarmInitReceiver"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class NoiceApplication : Application(), Configuration.Provider {
@set:Inject
internal lateinit var workerFactory: HiltWorkerFactory

override val workManagerConfiguration: Configuration = Configuration.Builder()
.setWorkerFactory(workerFactory)
.build()

Check warning on line 25 in app/src/main/java/com/github/ashutoshgngwr/noice/NoiceApplication.kt

View check run for this annotation

Codecov / codecov/patch

app/src/main/java/com/github/ashutoshgngwr/noice/NoiceApplication.kt#L23-L25

Added lines #L23 - L25 were not covered by tests

override fun onCreate() {
super.onCreate()
DynamicColorsOptions.Builder()
Expand All @@ -31,10 +35,4 @@ class NoiceApplication : Application(), Configuration.Provider {
.setAction(AlarmInitReceiver.ACTION_INIT)
.also { sendBroadcast(it) }
}

override fun getWorkManagerConfiguration(): Configuration {
return Configuration.Builder()
.setWorkerFactory(workerFactory)
.build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import android.view.WindowManager
import androidx.activity.addCallback
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.content.ContextCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
Expand Down Expand Up @@ -70,7 +71,12 @@ class AlarmRingerActivity : AppCompatActivity() {

override fun onStart() {
super.onStart()
registerReceiver(dismissBroadcastReceiver, IntentFilter(ACTION_DISMISS))
ContextCompat.registerReceiver(
this,
dismissBroadcastReceiver,
IntentFilter(ACTION_DISMISS),
ContextCompat.RECEIVER_NOT_EXPORTED,
)
}

override fun onStop() {
Expand Down Expand Up @@ -137,7 +143,9 @@ class AlarmRingerActivity : AppCompatActivity() {
}

fun dismiss(context: Context) {
context.sendBroadcast(Intent(ACTION_DISMISS))
Intent(ACTION_DISMISS)
.setPackage(context.packageName)
.also { context.sendBroadcast(it) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ class SoundPlaybackService : LifecycleService(), SoundPlayerManager.Listener,

override fun onCreate() {
super.onCreate()
registerReceiver(becomingNoisyReceiver, IntentFilter(AudioManager.ACTION_AUDIO_BECOMING_NOISY))
ContextCompat.registerReceiver(
this,
becomingNoisyReceiver,
IntentFilter(AudioManager.ACTION_AUDIO_BECOMING_NOISY),
ContextCompat.RECEIVER_EXPORTED,
)
castApiProvider?.addSessionListener(this)

lifecycleScope.launch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ class SoundPlaybackServiceTest {
}

every {
bindService(match { it.component?.className == serviceName }, any(), any())
bindService(match { it.component?.className == serviceName }, any(), any<Int>())
} answers {
val intent = firstArg<Intent>()
secondArg<ServiceConnection>().onServiceConnected(intent.component, onBind(intent))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class ShadowMediaSession : Player.Listener {
callback: MediaSession.Callback,
tokenExtras: Bundle,
bitmapLoader: BitmapLoader,
playIfSuppressed: Boolean,
isPeriodicPositionUpdateEnabled: Boolean,
) {
invokeConstructor(
MediaSession::class.java,
Expand All @@ -62,6 +64,11 @@ class ShadowMediaSession : Player.Listener {
ReflectionHelpers.ClassParameter.from(MediaSession.Callback::class.java, callback),
ReflectionHelpers.ClassParameter.from(Bundle::class.java, tokenExtras),
ReflectionHelpers.ClassParameter.from(BitmapLoader::class.java, bitmapLoader),
ReflectionHelpers.ClassParameter.from(Boolean::class.javaPrimitiveType, playIfSuppressed),
ReflectionHelpers.ClassParameter.from(
Boolean::class.javaPrimitiveType,
isPeriodicPositionUpdateEnabled,
),
)

this.player = player
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ plugins {
id 'com.android.library' version "${agpVersion}" apply false
id 'org.jetbrains.kotlin.android' version "${kotlinVersion}" apply false
id 'org.jetbrains.kotlin.kapt' version "${kotlinVersion}" apply false
id 'com.google.devtools.ksp' version "1.9.21-1.0.15" apply false
id 'com.google.devtools.ksp' version "1.9.21-1.0.16" apply false

id 'androidx.navigation.safeargs.kotlin' version "${navVersion}" apply false
id 'com.google.dagger.hilt.android' version "${hiltVersion}" apply false
id 'com.mikepenz.aboutlibraries.plugin' version "${aboutLibrariesVersion}" apply false

id 'com.google.gms.google-services' version '4.3.15' apply false // sed:free-build:remove
id 'com.google.firebase.crashlytics' version '2.9.5' apply false // sed:free-build:remove
id 'com.google.gms.google-services' version '4.4.0' apply false // sed:free-build:remove
id 'com.google.firebase.crashlytics' version '2.9.9' apply false // sed:free-build:remove

id 'com.adarshr.test-logger' version '4.0.0' apply false
}
Expand All @@ -19,15 +19,15 @@ plugins {
project.ext {
deps = [
aboutLibrariesVersion: "${aboutLibrariesVersion}",
androidXCoreVersion : '1.10.1',
androidXCoreVersion : '1.12.0',
coroutinesVersion : '1.7.3',
hiltVersion : "${hiltVersion}",
kotlinVersion : "${kotlinVersion}",
lifecycleVersion : '2.6.2',
navVersion : "${navVersion}",

junitVersion : '4.13.2',
robolectricVersion : '4.10.3',
robolectricVersion : '4.11.1',
testCoreVersion : '1.5.0',
]
}
Expand All @@ -39,11 +39,11 @@ subprojects {
}

android {
compileSdk 33
compileSdk 34

defaultConfig {
minSdk 21
targetSdk 33
targetSdk 34
}

compileOptions {
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android.nonFinalResIds=false
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# gradle plugin dependencies
agpVersion=8.1.2
hiltVersion=2.48
kotlinVersion=1.9.10
navVersion=2.6.0
aboutLibrariesVersion=10.8.3
agpVersion=8.2.0
hiltVersion=2.50
kotlinVersion=1.9.21
navVersion=2.7.6
aboutLibrariesVersion=10.9.2
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=591855b517fc635b9e04de1d05d5e76ada3f89f5fc76f87978d1b245b4f69225
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down

0 comments on commit 96bdf67

Please sign in to comment.