Skip to content

Commit

Permalink
Update target sdk version to 34 (#84)
Browse files Browse the repository at this point in the history
* Update compile and target sdk versions to 34
  • Loading branch information
deepanshu42 authored Jul 10, 2024
1 parent 40a161c commit bdcbff5
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 68 deletions.
7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
compileSdk 34

namespace = "com.gojek.courier.app"

defaultConfig {
applicationId "com.gojek.courier.app"
minSdkVersion 21
targetSdkVersion 31
targetSdkVersion 34
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ plugins {
}

dependencies {
implementation("com.android.tools.build:gradle:7.0.3")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31")
implementation("com.android.tools.build:gradle:7.4.2")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.18.0")
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.5.0")
}
Expand Down
12 changes: 6 additions & 6 deletions buildSrc/src/main/kotlin/deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ object versions {
const val jacoco = "0.8.6"
const val detekt = "1.18.0"

const val kotlin = "1.4.30"
const val agp = "7.0.3"
const val kotlin = "1.6.21"
const val agp = "7.4.2"
const val jetifierProcessor = "1.0.0-beta10"
const val jfrogBuildInfoExtractor = "4.11.0"
const val navigation = "2.1.0-rc01"
Expand All @@ -30,7 +30,7 @@ object versions {
const val materialVersion = "1.3.0"
const val annotationVersion = "1.2.0"
const val coreKtxVersion = "1.3.0"
const val apiValidator = "0.6.0"
const val apiValidator = "0.14.0"
const val workManager = "2.7.0"
}

Expand All @@ -45,11 +45,11 @@ object deps {
const val protobuf = "com.google.protobuf:protobuf-lite:3.0.0"

object build {
const val buildToolsVersion = "31.0.0"
const val compileSdkVersion = 31
const val buildToolsVersion = "33.0.1"
const val compileSdkVersion = 34
const val minSdkVersion = 21
const val sampleMinSdkVersion = 21
const val targetSdkVersion = 31
const val targetSdkVersion = 34
}

object test {
Expand Down
3 changes: 0 additions & 3 deletions courier-core-android/api/courier-core-android.api
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
public final class com/gojek/courier/utils/extensions/PendingIntentExtensionsKt {
}

9 changes: 0 additions & 9 deletions courier-core/api/courier-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ public final class com/gojek/courier/extensions/CollectionExtensionsKt {
public static final fun toImmutableSet (Ljava/util/Set;)Ljava/util/Set;
}

public final class com/gojek/courier/extensions/StringExtensionsKt {
}

public final class com/gojek/courier/extensions/TimeUnitExtensionsKt {
}

public abstract interface class com/gojek/courier/logging/ILogger {
public abstract fun d (Ljava/lang/String;Ljava/lang/String;)V
public abstract fun d (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
Expand All @@ -92,6 +86,3 @@ public abstract interface class com/gojek/courier/logging/ILogger {
public abstract fun w (Ljava/lang/String;Ljava/lang/Throwable;)V
}

public final class com/gojek/courier/utils/TypeUtils {
}

4 changes: 2 additions & 2 deletions docs/docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Supported SDK versions

- minSdkVersion: 21
- targetSdkVersion: 31
- compileSdkVersion: 31
- targetSdkVersion: 34
- compileSdkVersion: 34

## Download
[![Maven Central](https://img.shields.io/maven-central/v/com.gojek.courier/courier.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.gojek.courier%22%20AND%20a:%courier%22)
Expand Down
2 changes: 1 addition & 1 deletion gradle/ci-configs/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
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-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ internal class AdaptiveAlarmPingSender(
applicationContext.getSystemService(Service.ALARM_SERVICE) as AlarmManager

// pending intent can be null if we get a security exception in onstart-->defensive check
if (pendingIntent != null) {
alarmManager.cancel(pendingIntent)
pendingIntent?.let {
alarmManager.cancel(it)
}
} catch (ex: Exception) {
logger.d(TAG, "Unregister alarmreceiver to MqttService$ex")
Expand Down Expand Up @@ -147,21 +147,23 @@ internal class AdaptiveAlarmPingSender(
applicationContext.getSystemService(Service.ALARM_SERVICE) as AlarmManager
val alarmType = getAlarmType()
val isMqttAllowWhileIdle = pingSenderConfig.isMqttAllowWhileIdle
if (isMqttAllowWhileIdle && buildInfoProvider.isMarshmallowOrHigher) {
alarmManager.setExactAndAllowWhileIdle(
alarmType,
nextAlarmInMilliseconds,
pendingIntent
)
} else if (buildInfoProvider.isKitkatOrHigher) {
alarmManager.setExact(
alarmType,
nextAlarmInMilliseconds,
pendingIntent
)
} else {
alarmManager[alarmType, nextAlarmInMilliseconds] =
pendingIntent
pendingIntent?.let { pendingIntent ->
if (isMqttAllowWhileIdle && buildInfoProvider.isMarshmallowOrHigher) {
alarmManager.setExactAndAllowWhileIdle(
alarmType,
nextAlarmInMilliseconds,
pendingIntent
)
} else if (buildInfoProvider.isKitkatOrHigher) {
alarmManager.setExact(
alarmType,
nextAlarmInMilliseconds,
pendingIntent
)
} else {
alarmManager[alarmType, nextAlarmInMilliseconds] =
pendingIntent
}
}
} catch (ex: Exception) {
logger.d(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ internal class AlarmPingSender(
applicationContext.getSystemService(Service.ALARM_SERVICE) as AlarmManager

// pending intent can be null if we get a security exception in onstart-->defensive check
if (pendingIntent != null) {
alarmManager.cancel(pendingIntent)
pendingIntent?.let {
alarmManager.cancel(it)
}
} catch (ex: Exception) {
logger.d(TAG, "Unregister alarmreceiver to MqttService$ex")
Expand Down Expand Up @@ -133,23 +133,25 @@ internal class AlarmPingSender(
applicationContext.getSystemService(Service.ALARM_SERVICE) as AlarmManager
val alarmType = getAlarmType()
val isMqttAllowWhileIdle = alarmPingSenderConfig.isMqttAllowWhileIdle
if (isMqttAllowWhileIdle && buildInfoProvider.isMarshmallowOrHigher) {
alarmManager.setExactAndAllowWhileIdle(
alarmType,
nextAlarmInMilliseconds,
pendingIntent
)
} else if (buildInfoProvider.isKitkatOrHigher) {
alarmManager.setExact(
alarmType,
nextAlarmInMilliseconds,
pendingIntent
)
} else {
alarmManager[alarmType, nextAlarmInMilliseconds] =
pendingIntent
pendingIntent?.let { pendingIntent ->
if (isMqttAllowWhileIdle && buildInfoProvider.isMarshmallowOrHigher) {
alarmManager.setExactAndAllowWhileIdle(
alarmType,
nextAlarmInMilliseconds,
pendingIntent
)
} else if (buildInfoProvider.isKitkatOrHigher) {
alarmManager.setExact(
alarmType,
nextAlarmInMilliseconds,
pendingIntent
)
} else {
alarmManager[alarmType, nextAlarmInMilliseconds] =
pendingIntent
}
pingSenderEvents.mqttPingScheduled(delayInMilliseconds.fromMillisToSeconds(), comms.keepAlive.fromMillisToSeconds())
}
pingSenderEvents.mqttPingScheduled(delayInMilliseconds.fromMillisToSeconds(), comms.keepAlive.fromMillisToSeconds())
} catch (ex: Exception) {
logger.d(
TAG,
Expand Down
6 changes: 0 additions & 6 deletions pingsender/mqtt-pingsender/api/mqtt-pingsender.api
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
public abstract interface class com/gojek/mqtt/pingsender/AdaptiveMqttPingSender : com/gojek/mqtt/pingsender/MqttPingSender {
}

public final class com/gojek/mqtt/pingsender/KeepAliveKt {
}

public abstract interface class com/gojek/mqtt/pingsender/MqttPingSender {
public abstract fun init (Lorg/eclipse/paho/client/mqttv3/internal/ClientComms;Lorg/eclipse/paho/client/mqttv3/ILogger;)V
public abstract fun schedule (J)V
public abstract fun start ()V
public abstract fun stop ()V
}

public final class com/gojek/mqtt/pingsender/MqttPingSenderKt {
}

0 comments on commit bdcbff5

Please sign in to comment.