Skip to content

Commit

Permalink
Merge pull request #30 from roozbehzarei/dev
Browse files Browse the repository at this point in the history
Release v2.1.0
  • Loading branch information
roozbehzarei authored Jul 29, 2023
2 parents 080b84e + bc2b282 commit eef30a4
Show file tree
Hide file tree
Showing 21 changed files with 309 additions and 224 deletions.
77 changes: 0 additions & 77 deletions app/build.gradle

This file was deleted.

88 changes: 88 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("androidx.navigation.safeargs.kotlin")
id("com.google.devtools.ksp")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("com.google.firebase.firebase-perf")
}

android {
namespace = "com.roozbehzarei.filester"
compileSdk = 33

defaultConfig {
applicationId = "com.roozbehzarei.filester"
minSdk = 21
targetSdk = 33
versionCode = 4
versionName = "2.1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures {
viewBinding = true
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
androidResources {
generateLocaleConfig = true
}
}

dependencies {
val navVersion = "2.5.3"
val activityVersion = "1.7.2"
val fragmentVersion = "1.6.1"
val lifecycleVersion = "2.6.1"
val retrofitVersion = "2.9.0"
val workVersion = "2.8.1"
val roomVersion = "2.5.2"

implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
// Fragment
implementation("androidx.fragment:fragment-ktx:$fragmentVersion")
// Navigation
implementation("androidx.navigation:navigation-fragment-ktx:$navVersion")
implementation("androidx.navigation:navigation-ui-ktx:$navVersion")
// ViewModel
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion")
// Retrofit with Scalars Converter
implementation("com.squareup.retrofit2:converter-scalars:$retrofitVersion")
// WorkManager
implementation("androidx.work:work-runtime-ktx:$workVersion")
// Room
implementation("androidx.room:room-runtime:$roomVersion")
annotationProcessor("androidx.room:room-compiler:$roomVersion")
implementation("androidx.room:room-ktx:$roomVersion")
ksp("androidx.room:room-compiler:$roomVersion")
// Activity
implementation("androidx.activity:activity-ktx:$activityVersion")
// SplashScreen
implementation("androidx.core:core-splashscreen:1.0.1")
// Firebase
implementation(platform("com.google.firebase:firebase-bom:32.2.0"))
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-crashlytics-ktx")
implementation("com.google.firebase:firebase-perf-ktx")
}
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
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": 3,
"versionName": "2.0.1",
"versionCode": 4,
"versionName": "2.1.0",
"outputFile": "app-release.apk"
}
],
Expand Down
17 changes: 14 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.roozbehzarei.filester">
xmlns:tools="http://schemas.android.com/tools">

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

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

<application
Expand All @@ -16,15 +15,27 @@
android:supportsRtl="true"
android:theme="@style/Theme.Filester.Starting">

<service
android:name="androidx.work.impl.foreground.SystemForegroundService"
android:foregroundServiceType="dataSync"
tools:node="merge" />

<meta-data
android:name="firebase_performance_logcat_enabled"
android:value="true" />

<activity
android:name=".ui.MainActivity"
android:launchMode="singleTask"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>

</application>

</manifest>
30 changes: 0 additions & 30 deletions app/src/main/java/com/roozbehzarei/filester/NotificationUtils.kt

This file was deleted.

12 changes: 1 addition & 11 deletions app/src/main/java/com/roozbehzarei/filester/ui/AboutFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.roozbehzarei.filester.BuildConfig
import com.roozbehzarei.filester.R
import com.roozbehzarei.filester.databinding.FragmentAboutBinding

private const val GITHUB_URL = "https://github.com/roozbehzarei"
private const val GITHUB_URL = "https://roozbehzarei.me/project/filester/"
private const val DONATE_URL = "https://www.buymeacoffee.com/roozbehzarei/"
private const val TRANSFER_URL = "https://transfer.sh/"

Expand Down Expand Up @@ -46,16 +46,6 @@ class AboutFragment : Fragment() {
}
}

override fun onResume() {
super.onResume()
requireActivity().actionBar?.setDisplayShowTitleEnabled(false)
}

override fun onPause() {
super.onPause()
requireActivity().actionBar?.setDisplayShowTitleEnabled(true)
}

/**
* Open the passed [url] in browser
*/
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/java/com/roozbehzarei/filester/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController
import com.google.android.material.appbar.AppBarLayout
import com.roozbehzarei.filester.CHANNEL_ID
import com.roozbehzarei.filester.R
import com.roozbehzarei.filester.databinding.ActivityMainBinding

Expand Down Expand Up @@ -54,15 +53,15 @@ class MainActivity : AppCompatActivity() {
}

// Change the color of the navigation bars
val windowInsetsController =
WindowCompat.getInsetsController(window, binding.root)
val windowInsetsController = WindowCompat.getInsetsController(window, binding.root)
val currentNightMode =
applicationContext.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
when (currentNightMode) {
Configuration.UI_MODE_NIGHT_NO -> {
windowInsetsController.isAppearanceLightNavigationBars = true
windowInsetsController.isAppearanceLightStatusBars = true
}

Configuration.UI_MODE_NIGHT_YES -> {
windowInsetsController.isAppearanceLightNavigationBars = false
windowInsetsController.isAppearanceLightStatusBars = false
Expand All @@ -89,8 +88,10 @@ class MainActivity : AppCompatActivity() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val name = getString(R.string.channel_name)
val descriptionText = getString(R.string.channel_description)
val importance = NotificationManager.IMPORTANCE_DEFAULT
val channel = NotificationChannel(CHANNEL_ID, name, importance).apply {
val importance = NotificationManager.IMPORTANCE_LOW
val channel = NotificationChannel(
getString(R.string.notification_channel_id), name, importance
).apply {
description = descriptionText
}
// Register the channel with the system
Expand Down
Loading

0 comments on commit eef30a4

Please sign in to comment.