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
24 changes: 22 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ let package = Package(
name: "GutenbergKit",
platforms: [.iOS(.v17), .macOS(.v14)],
products: [
.library(name: "GutenbergKit", targets: ["GutenbergKit"])
.library(name: "GutenbergKit", targets: ["GutenbergKit"]),
.library(name: "GutenbergKitHTTP", targets: ["GutenbergKitHTTP"]),
],
dependencies: [
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.7.5"),
Expand All @@ -21,6 +22,17 @@ let package = Package(
exclude: [],
resources: [.copy("Gutenberg")]
),
.target(
name: "GutenbergKitHTTP",
path: "ios/Sources/GutenbergKitHTTP",
exclude: ["README.md"]
),
.executableTarget(
name: "GutenbergKitDebugServer",
dependencies: ["GutenbergKitHTTP"],
path: "ios/Sources/GutenbergKitDebugServer",
exclude: ["README.md"]
),
.testTarget(
name: "GutenbergKitTests",
dependencies: ["GutenbergKit"],
Expand All @@ -29,6 +41,14 @@ let package = Package(
resources: [
.process("Resources")
]
)
),
.testTarget(
name: "GutenbergKitHTTPTests",
dependencies: ["GutenbergKitHTTP"],
path: "ios/Tests/GutenbergKitHTTPTests",
resources: [
.copy("../../../test-fixtures/http")
]
),
]
)
15 changes: 15 additions & 0 deletions android/Gutenberg/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,23 @@ android {
jvmTarget = "1.8"
}

sourceSets {
getByName("androidTest") {
// Make shared test fixtures available as assets for instrumented tests.
assets.srcDir(rootProject.file("../test-fixtures"))
}
}

testOptions {
unitTests {
isReturnDefaultValues = true
all {
// Make the shared test fixtures available to fixture-driven tests.
val fixturesDir = rootProject.file("../test-fixtures/http")
it.systemProperty("test.fixtures.dir", fixturesDir.absolutePath)
// Track fixture files as task inputs so changes trigger re-runs.
it.inputs.dir(fixturesDir)
}
}
}
}
Expand All @@ -64,6 +78,7 @@ dependencies {
implementation(libs.okhttp)

testImplementation(libs.junit)
testImplementation(kotlin("test"))
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.mockito.core)
testImplementation(libs.mockito.kotlin)
Expand Down
Loading
Loading