Skip to content

Commit 6a7a2e3

Browse files
committed
[feature/DroidKaigi#719] Fix local build
1 parent c9d90ba commit 6a7a2e3

File tree

10 files changed

+46352
-19
lines changed

10 files changed

+46352
-19
lines changed

app-android/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ android {
8989
signingConfig = signingConfigs.getByName("debug")
9090
matchingFallbacks += listOf("release")
9191
isDebuggable = false
92-
proguardFiles("benchmark-rules.pro")
92+
isMinifyEnabled = true
93+
proguardFiles(
94+
getDefaultProguardFile("proguard-android-optimize.txt"),
95+
"proguard-rules.pro"
96+
)
9397
}
9498
}
9599
}

app-android/src/devRelease/generated/baselineProfiles/baseline-prof.txt

Lines changed: 25891 additions & 0 deletions
Large diffs are not rendered by default.

app-android/src/prodRelease/generated/baselineProfiles/baseline-prof.txt

Lines changed: 20425 additions & 0 deletions
Large diffs are not rendered by default.

baselineprofile/build.gradle.kts

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
import com.android.build.api.dsl.ManagedVirtualDevice
22

3-
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
43
plugins {
54
alias(libs.plugins.androidTest)
65
alias(libs.plugins.kotlinGradlePlugin)
76
alias(libs.plugins.androidx.baselineprofile)
87
}
98

109
android {
11-
namespace = "io.github.droidkaigi.confsched2023"
10+
namespace = "io.github.droidkaigi.confsched2023.baselineprofile"
1211
compileSdk = 34
1312

1413
compileOptions {
15-
sourceCompatibility = JavaVersion.VERSION_11
16-
targetCompatibility = JavaVersion.VERSION_11
14+
sourceCompatibility = JavaVersion.VERSION_17
15+
targetCompatibility = JavaVersion.VERSION_17
1716
}
1817

1918
kotlinOptions {
20-
jvmTarget = "11"
19+
jvmTarget = "17"
2120
}
2221

2322
defaultConfig {
@@ -32,8 +31,22 @@ android {
3231

3332
flavorDimensions += listOf("network")
3433
productFlavors {
35-
create("dev") { dimension = "network" }
36-
create("prod") { dimension = "network" }
34+
create("dev") {
35+
dimension = "network"
36+
buildConfigField(
37+
"String",
38+
"APP_FLAVOR_SUFFIX",
39+
"\".dev\""
40+
)
41+
}
42+
create("prod") {
43+
dimension = "network"
44+
buildConfigField(
45+
"String",
46+
"APP_FLAVOR_SUFFIX",
47+
"\"\""
48+
)
49+
}
3750
}
3851

3952
testOptions.managedDevices.devices {

baselineprofile/src/main/java/io/github/droidkaigi/confsched2023/Constant.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package io.github.droidkaigi.confsched2023.baselineprofile
2+
3+
val PACKAGE_NAME = buildString {
4+
append("io.github.droidkaigi.confsched2023")
5+
append(BuildConfig.APP_FLAVOR_SUFFIX)
6+
}

baselineprofile/src/main/java/io/github/droidkaigi/confsched2023/BaselineProfileGenerator.kt renamed to baselineprofile/src/main/java/io/github/droidkaigi/confsched2023/baselineprofile/BaselineProfileGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.droidkaigi.confsched2023
1+
package io.github.droidkaigi.confsched2023.baselineprofile
22

33
import androidx.benchmark.macro.junit4.BaselineProfileRule
44
import androidx.test.ext.junit.runners.AndroidJUnit4

baselineprofile/src/main/java/io/github/droidkaigi/confsched2023/StartupBenchmarks.kt renamed to baselineprofile/src/main/java/io/github/droidkaigi/confsched2023/baselineprofile/StartupBenchmarks.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.droidkaigi.confsched2023
1+
package io.github.droidkaigi.confsched2023.baselineprofile
22

33
import androidx.benchmark.macro.BaselineProfileMode
44
import androidx.benchmark.macro.CompilationMode

build-logic/src/main/kotlin/io/github/droidkaigi/confsched2023/primitive/KmpPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class KmpPlugin : Plugin<Project> {
1313
with(pluginManager) {
1414
apply("org.jetbrains.kotlin.multiplatform")
1515
}
16-
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java) {
16+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
1717
kotlinOptions.jvmTarget = "11"
1818
}
1919
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink>().configureEach {

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ twitterComposeRule = "0.0.26"
3939
lottie = "6.1.0"
4040
kover = "0.7.3"
4141
uiautomator = "2.2.0"
42-
benchmark-macro-junit4 = "1.2.0-beta01"
43-
androidx-baselineprofile = "1.2.0-beta01"
42+
benchmark-macro-junit4 = "1.2.4"
43+
androidx-baselineprofile = "1.2.4"
4444
profileinstaller = "1.3.1"
4545

4646
[libraries]

0 commit comments

Comments
 (0)