Skip to content

Commit

Permalink
Gradle, Java and Library Version Bump (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
krayong-work authored Mar 14, 2024
1 parent 3f69670 commit 820bd53
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ enum class PerformanceLevel(val level: Int) {
companion object {

internal fun getPerformanceLevel(level: Int? = null): PerformanceLevel =
PerformanceLevel.values().find { it.level == level } ?: UNKNOWN
entries.find { it.level == level } ?: UNKNOWN
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.blinkit.droiddex.cpu
import android.content.Context
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.core.performance.DevicePerformance
import androidx.core.performance.DefaultDevicePerformance
import com.blinkit.droiddex.constants.PerformanceClass
import com.blinkit.droiddex.constants.PerformanceLevel
import com.blinkit.droiddex.cpu.utils.CpuInfoManager
Expand All @@ -22,6 +22,8 @@ internal class CpuPerformanceManager(

private val cpuInfoManager by lazy { CpuInfoManager(logger) }

private val devicePerformance by lazy { DefaultDevicePerformance() }

private val lowSocModels = intArrayOf(
-1775228513, // EXYNOS 850
802464304, // EXYNOS 7872
Expand Down Expand Up @@ -79,7 +81,7 @@ internal class CpuPerformanceManager(
private fun getBuildSocModel() = Build.SOC_MODEL.uppercase(Locale.getDefault()).hashCode()

private fun getMediaPerformanceClass() =
DevicePerformance.create(applicationContext).mediaPerformanceClass.also { logDebug("MEDIA PERFORMANCE CLASS: $it") }
devicePerformance.mediaPerformanceClass.also { logDebug("MEDIA PERFORMANCE CLASS: $it") }

private fun getAndroidVersion() = Build.VERSION.SDK_INT.also { logDebug("ANDROID VERSION: $it") }

Expand Down
5 changes: 4 additions & 1 deletion example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ plugins {
android {
namespace = "com.blinkit.droiddexexample"

buildFeatures { viewBinding = true }
buildFeatures {
viewBinding = true
buildConfig = true
}

compileSdk = libs.versions.compileSdk.get().toInt()

Expand Down
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ org.gradle.configuration-cache-problems=warn
# Maven Publishing
GROUP=com.blinkit.kits
POM_ARTIFACT_ID=droid-dex
VERSION_NAME=1.0.0
VERSION_NAME=2.0.0

POM_NAME=Droid Dex
POM_DESCRIPTION=Classification and Analysis of Android Device Performance
Expand All @@ -60,3 +60,7 @@ POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/grofers/droid-dex.git
POM_DEVELOPER_ID=Blinkit
POM_DEVELOPER_NAME=Blink Commerce Private Limited (formerly known as Grofers India Private Limited)
POM_DEVELOPER_URL=https://github.com/grofers/

# Upgrade lint to a newer version to work around https://issuetracker.google.com/issues/185418482.
# Remove after updating to Gradle version 8.1.0
android.experimental.lint.version=8.1.0
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[versions]
java = "11"
java = "17"

minSdk = "21"
targetSdk = "34"
compileSdk = "34"

agp = "7.4.2"
kotlin = "1.8.21"
agp = "8.0.2"
kotlin = "1.9.21"
maven-publish = "0.27.0"

timber = "5.0.1"

core-ktx = "1.7.0"
app-compat = "1.6.0"
app-compat = "1.6.1"

material = "1.9.0"
constraint-layout = "2.1.4"

kotlinx-coroutines = "1.6.4"
kotlinx-coroutines = "1.7.2"

lifecycle = "2.5.1"

core-performance = "1.0.0-alpha02"
core-performance = "1.0.0"


[libraries]
Expand Down
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,6 +1,6 @@
#Wed Jan 03 19:34:15 IST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 820bd53

Please sign in to comment.