Skip to content

Commit cf9af94

Browse files
committed
Add flag to explicitly enable android benchmarks
1 parent 3312ad4 commit cf9af94

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ subprojects {
5151

5252
apiValidation {
5353
ignoredProjects.add("kotlinx-io-benchmarks")
54-
ignoredProjects.add("kotlinx-io-benchmarks-android")
54+
val androidBenchmarksEnabled = project.findProperty("androidBenchmarksEnabled")?.toString()?.toBoolean() ?: false
55+
if (androidBenchmarksEnabled) {
56+
ignoredProjects.add("kotlinx-io-benchmarks-android")
57+
}
5558
}
5659

5760
dependencies {

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ version=0.3.1-SNAPSHOT
88
kotlin.code.style=official
99
org.gradle.jvmargs=-Xmx4G
1010
nativeBenchmarksEnabled=false
11+
androidBenchmarksEnabled=false
1112
kotlin.mpp.applyDefaultHierarchyTemplate=false
1213
android.useAndroidX=true

settings.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ rootProject.name = "kotlinx-io"
1818
include(":kotlinx-io-core")
1919
include(":kotlinx-io-benchmarks")
2020
include(":kotlinx-io-bytestring")
21-
include(":kotlinx-io-benchmarks-android")
2221
project(":kotlinx-io-core").projectDir = file("./core")
2322
project(":kotlinx-io-benchmarks").projectDir = file("./benchmarks")
2423
project(":kotlinx-io-bytestring").projectDir = file("./bytestring")
25-
project(":kotlinx-io-benchmarks-android").projectDir = file("./benchmarks-android")
24+
25+
if (providers.gradleProperty("androidBenchmarksEnabled").getOrElse("false").toBoolean()) {
26+
include(":kotlinx-io-benchmarks-android")
27+
project(":kotlinx-io-benchmarks-android").projectDir = file("./benchmarks-android")
28+
}

0 commit comments

Comments
 (0)