Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ buildscript {
project.extra.set("artifactoryUrl", artifactoryUrl)
project.extra.set("artifactoryUsername", artifactoryUsername)
project.extra.set("artifactoryPassword", artifactoryPassword)
project.extra.set("internalToolkitTestsDir", projectDir.absolutePath.removeSuffix("arcgis-maps-sdk-kotlin-toolkit") + "/kotlin/internal-toolkit-tests")

val finalBuild: Boolean = (project.properties["finalBuild"] ?: "false")
.run { this == "true" }
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ androidxTestExt = "1.3.0"
androidXTestRunner = "1.7.0"
androidXTestRules = "1.7.0"
androidxWindow = "1.4.0"
mockingjay = "2.0.0"
workVersion = "2.10.3"
binaryCompatibilityValidator = "0.18.1"
compileSdk = "36"
Expand Down Expand Up @@ -81,6 +82,7 @@ hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", v
junit = { group = "junit", name = "junit", version.ref = "junit" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesTest" }
mockingjay = { module = "com.esri:mockingjay", version.ref = "mockingjay" }
mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockkAndroid" }
room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
Expand Down
2 changes: 1 addition & 1 deletion toolkit/ar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ dependencies {
implementation(libs.androidx.activity.compose)
implementation(libs.play.services.location)
testImplementation(libs.bundles.unitTest)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.bundles.composeTest)
androidTestImplementation(libs.androidx.test.rules)
debugImplementation(libs.bundles.debug)
}
13 changes: 13 additions & 0 deletions toolkit/featureforms/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ android {
// This is the default variant.
}
}

val internalToolkitTestsDir = project.findProperty("internalToolkitTestsDir") as String
sourceSets.getByName("androidTest") {
var file = file("$internalToolkitTestsDir/${project.name}")
if (file.exists()) {
java.setSrcDirs(java.srcDirs.plus(file))
}
}
}

apiValidation {
Expand Down Expand Up @@ -161,4 +169,9 @@ dependencies {
androidTestImplementation(libs.bundles.composeTest)
androidTestImplementation(libs.bundles.androidXTest)
debugImplementation(libs.bundles.debug)

// Include only if internal tests are required
// if (file(project.findProperty("internalToolkitTestsDir") as String).exists()) {
// implementation(libs.mockingjay)
// }
}
18 changes: 18 additions & 0 deletions toolkit/template/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ android {
val connectedTestReportsPath: String by project
reportDir = "$connectedTestReportsPath/${project.name}"
}

/**
* Include this if any internal-only tests are required
*/
val internalToolkitTestsDir = project.findProperty("internalToolkitTestsDir") as String
sourceSets.getByName("androidTest") {
var file = file("$internalToolkitTestsDir/${project.name}")
if (file.exists()) {
java.setSrcDirs(java.srcDirs.plus(file))
}
}
}

dependencies {
Expand All @@ -78,4 +89,11 @@ dependencies {
testImplementation(libs.bundles.unitTest)
androidTestImplementation(libs.bundles.composeTest)
debugImplementation(libs.bundles.debug)

/**
* Include this if any internal-only test dependencies are required
*/
// if (file(project.findProperty("internalToolkitTestsDir") as String).exists()) {
// androidTestImplementation(<INTERNAL_ONLY_DEPENDENCY>)
// }
}