Skip to content

Commit

Permalink
feat: migration to WorkManager
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrijkotov634 committed Mar 20, 2022
1 parent 59a1954 commit 2e1d732
Show file tree
Hide file tree
Showing 15 changed files with 206 additions and 551 deletions.
2 changes: 2 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android {
applicationId "com.dm.bomber"
minSdkVersion 21
targetSdkVersion 32
versionCode 15
versionName "1.10.1"
versionCode 18
versionName "1.11"
}

buildTypes {
Expand All @@ -37,12 +37,14 @@ android {
dependencies {
implementation platform('com.google.firebase:firebase-bom:29.1.0')

implementation 'com.google.firebase:firebase-crashlytics:18.2.8'
implementation 'com.google.firebase:firebase-analytics:20.1.0'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'

implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.preference:preference:1.2.0'
implementation 'com.google.android.material:material:1.6.0-alpha02'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.4'
implementation 'androidx.work:work-runtime:2.7.1'

implementation 'com.google.android.material:material:1.6.0-alpha03'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.5'
implementation 'jp.wasabeef:blurry:4.0.1'
}
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 15,
"versionName": "1.10.1",
"versionCode": 18,
"versionName": "1.10.4",
"outputFile": "app-release.apk"
}
],
Expand Down
14 changes: 14 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dm.bomber">

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

<application
android:name=".BomberApplication"
android:allowBackup="true"
android:fullBackupOnly="true"
android:icon="@mipmap/ic_launcher"
Expand Down Expand Up @@ -44,5 +46,17 @@
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>

<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">

<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>
</application>
</manifest>
27 changes: 27 additions & 0 deletions app/src/main/java/com/dm/bomber/BomberApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.dm.bomber;

import android.app.Application;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.work.Configuration;

import com.google.android.material.color.DynamicColors;

public class BomberApplication extends Application implements Configuration.Provider {
@Override
public void onCreate() {
DynamicColors.applyToActivitiesIfAvailable(this);

super.onCreate();
}

@NonNull
@Override
public Configuration getWorkManagerConfiguration() {
return new Configuration.Builder()
.setMinimumLoggingLevel(Log.ERROR)
.build();

}
}
9 changes: 0 additions & 9 deletions app/src/main/java/com/dm/bomber/bomber/Callback.java

This file was deleted.

Loading

0 comments on commit 2e1d732

Please sign in to comment.