Skip to content

Commit

Permalink
Upgraded project dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
to268 committed May 10, 2023
1 parent 8ef4a66 commit d4a9eb1
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 29 deletions.
9 changes: 4 additions & 5 deletions android-smsmms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
}

lintOptions {
abortOnError false
}

useLibrary 'org.apache.http.legacy'
namespace 'com.klinker.android.send_message'
lint {
abortOnError false
}
}

dependencies {
Expand Down
10 changes: 7 additions & 3 deletions android-smsmms/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="com.klinker.android.send_message"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>

<application>

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
ext.exoplayer_version = "2.8.1"
ext.glide_version = "4.8.0"
ext.junit_version = '4.12'
ext.kotlin_version = '1.3.60'
ext.kotlin_version = '1.6.21'
ext.lifecycle_version = '2.1.0'
ext.material_version = '1.0.0'
ext.mockito_version = '2.18.3'
Expand All @@ -42,9 +42,9 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.realm:realm-gradle-plugin:$realm_version"
}
Expand Down
1 change: 1 addition & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}
namespace 'com.moez.QKSMS.common'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest package="com.moez.QKSMS.common" />
<manifest />
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ package com.moez.QKSMS.common.util.extensions

import android.app.job.JobScheduler
import android.content.Context
import android.content.pm.PackageInfo
import android.content.res.ColorStateList
import android.graphics.Color
import android.util.TypedValue
import android.widget.Toast
import androidx.annotation.StringRes
import androidx.core.content.ContextCompat
import androidx.core.content.getSystemService
import androidx.core.content.pm.PackageInfoCompat
import com.moez.QKSMS.util.tryOrNull

fun Context.getColorCompat(colorRes: Int): Int {
Expand Down Expand Up @@ -85,7 +87,7 @@ fun Context.isInstalled(packageName: String): Boolean {
}

val Context.versionCode: Int
get() = packageManager.getPackageInfo(packageName, 0).versionCode
get() = PackageInfoCompat.getLongVersionCode(PackageInfo()).toInt()

val Context.jobScheduler: JobScheduler
get() = getSystemService()!!
1 change: 1 addition & 0 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ android {
withAnalytics { dimension "analytics" }
noAnalytics { dimension "analytics" }
}
namespace 'com.moez.QKSMS.data'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion data/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest package="com.moez.QKSMS.data" />
<manifest />
1 change: 1 addition & 0 deletions domain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ android {
minSdkVersion 21
targetSdkVersion 29
}
namespace 'com.moez.QKSMS.domain'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion domain/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest package="com.moez.QKSMS.domain" />
<manifest />
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
8 changes: 4 additions & 4 deletions presentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
flavorDimensions "analytics"

defaultConfig {
Expand Down Expand Up @@ -61,14 +60,15 @@ android {
jvmTarget = "1.8"
}

lintOptions {
abortOnError false
}

productFlavors {
withAnalytics { dimension "analytics" }
noAnalytics { dimension "analytics" }
}
namespace 'com.moez.QKSMS'
lint {
abortOnError false
}

if (System.getenv("CI") == "true") {
signingConfigs.release.storeFile = file("../keystore")
Expand Down
3 changes: 1 addition & 2 deletions presentation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.moez.QKSMS">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package com.moez.QKSMS.common.widget

import android.content.Context
import android.util.AttributeSet
import kotlin.math.ceil

class TightTextView @JvmOverloads constructor(
context: Context,
Expand All @@ -35,11 +36,9 @@ class TightTextView @JvmOverloads constructor(
return
}

val maxLineWidth = (0 until layout.lineCount)
.map(layout::getLineWidth)
.max() ?: 0f
val maxLineWidth = (0 until layout.lineCount).maxOfOrNull(layout::getLineWidth) ?: 0f

val width = Math.ceil(maxLineWidth.toDouble()).toInt() + compoundPaddingLeft + compoundPaddingRight
val width = ceil(maxLineWidth.toDouble()).toInt() + compoundPaddingLeft + compoundPaddingRight
if (width < measuredWidth) {
val widthSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.getMode(widthMeasureSpec))
super.onMeasure(widthSpec, heightMeasureSpec)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class BackupPresenter @Inject constructor(
.distinctUntilChanged()
.switchMap { backupRepo.getBackups() }
.doOnNext { backups -> newState { copy(backups = backups) } }
.map { backups -> backups.map { it.date }.max() ?: 0L }
.map { backups -> backups.maxOfOrNull { it.date } ?: 0L }
.map { lastBackup ->
when (lastBackup) {
0L -> context.getString(R.string.backup_never)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import javax.inject.Inject
class UpgradeButtonExperiment @Inject constructor(
context: Context,
analytics: AnalyticsManager
) : Experiment<@StringRes Int>(context, analytics) {
) : Experiment<@receiver:StringRes Int>(context, analytics) {

override val key: String = "Upgrade Button"

Expand Down

0 comments on commit d4a9eb1

Please sign in to comment.