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
14 changes: 13 additions & 1 deletion skipstone/Sources/SkipBuild/Commands/SkipstoneCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,12 @@ struct SkipstoneCommand: BuildPluginOptionsCommand, StreamingCommand {
.init("testImplementation(project(\":\(moduleName)\"))"),
.init("androidTestImplementation(project(\":\(moduleName)\"))")
]
if configMap[moduleName]?.skip?.testFixtures == true {
moduleDependencyBlocks += [
.init("testImplementation(testFixtures(project(\":\(moduleName)\")))"),
.init("androidTestImplementation(testFixtures(project(\":\(moduleName)\")))")
]
}
} else {
moduleDependencyBlocks += [
.init("api(project(\":\(moduleName)\"))"),
Expand Down Expand Up @@ -1049,7 +1055,13 @@ struct SkipstoneCommand: BuildPluginOptionsCommand, StreamingCommand {

if fs.isDirectory(sourcePath) {
// make recursive folders for sub-linked resources
let subPaths = try linkSkipFolder(sourcePath, to: outputPath, topLevel: false)
let destination: AbsolutePath
if topLevel, fileName == "testFixtures", baseSkipConfig.skip?.testFixtures == true {
destination = try AbsolutePath(outputFolderPath, validating: "../testFixtures/kotlin")
} else {
destination = outputPath
}
let subPaths = try linkSkipFolder(sourcePath, to: destination, topLevel: false)
copiedFiles.formUnion(subPaths)
} else {
if let outputFilePath = try sourceFileOutputPath(for: sourcePath.basename, in: topLevel ? nil : outputFilePath) {
Expand Down
2 changes: 2 additions & 0 deletions skipstone/Sources/SkipBuild/SkipConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ struct SkipConfig : Codable {
struct TranspilationConfig : Codable {
/// The name of the package this module should be set to
var package: String?
/// Publish shared test support from the Skip/testFixtures directory.
var testFixtures: Bool?
/// Skip mode: `native|transpiled`
var mode: String?
/// Whether/how to bridge this module
Expand Down
Loading