Skip to content

Commit

Permalink
Upgrade project
Browse files Browse the repository at this point in the history
  • Loading branch information
AfigAliyev committed May 9, 2024
1 parent 45fe881 commit a826222
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,23 @@

package com.maximillianleonov.cinemax.benchmark

import androidx.benchmark.macro.ExperimentalBaselineProfilesApi
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.benchmark.macro.junit4.BaselineProfileRule
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
import com.maximillianleonov.cinemax.benchmark.util.PackageName
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

@OptIn(ExperimentalBaselineProfilesApi::class)
@RequiresApi(Build.VERSION_CODES.P)
@RunWith(AndroidJUnit4ClassRunner::class)
class BaselineProfileGenerator {
@get:Rule
val baselineProfileRule = BaselineProfileRule()

@Test
fun generate() = baselineProfileRule.collectBaselineProfile(packageName = PackageName) {
fun generate() = baselineProfileRule.collect(packageName = PackageName) {
pressHome()
startActivityAndWait()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.gradle.kotlin.dsl.dependencies
/**
* Configure Compose-specific options.
*/
internal fun Project.configureAndroidCompose(commonExtension: CommonExtension<*, *, *, *, *>) =
internal fun Project.configureAndroidCompose(commonExtension: CommonExtension<*, *, *, *, *, *>) =
with(commonExtension) {
defaultConfig.vectorDrawables.useSupportLibrary = true
buildFeatures.compose = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
/**
* Configure base Kotlin with Android options.
*/
internal fun Project.configureKotlinAndroid(commonExtension: CommonExtension<*, *, *, *, *>) =
internal fun Project.configureKotlinAndroid(commonExtension: CommonExtension<*, *, *, *, *, *>) =
with(commonExtension) {
compileSdk = libs.versions.android.compileSdk.get().toInt()

Expand All @@ -47,5 +47,5 @@ internal fun Project.configureKotlinAndroid(commonExtension: CommonExtension<*,
dependencies.add("coreLibraryDesugaring", libs.desugar.jdk.libs)
}

private fun CommonExtension<*, *, *, *, *>.kotlinOptions(block: KotlinJvmOptions.() -> Unit) =
private fun CommonExtension<*, *, *, *, *, *>.kotlinOptions(block: KotlinJvmOptions.() -> Unit) =
(this as ExtensionAware).extensions.configure("kotlinOptions", block)
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ android-compileSdk = "34"
android-minSdk = "21"
android-targetSdk = "34"

kotlin = "1.9.24"
kotlin = "1.9.23"
android-gradle-plugin = "8.4.0"
ksp = "1.9.24-1.0.20"
ksp = "1.9.23-1.0.20"
spotless = "6.25.0"
detekt = "1.23.6"
kode-detekt-rules-compose = "1.3.0"
Expand Down

0 comments on commit a826222

Please sign in to comment.