apache / daffodil-sbt

Apache Daffodil SBT Plugin
https://daffodil.apache.org/
Apache License 2.0
1 stars 3 forks source link

Option to configure flattened layout #8

Closed stevedlawrence closed 9 months ago

stevedlawrence commented 9 months ago

Although not very common, it is sometimes preferred to have a flattened schema layout, where there are only two directories src/ and test/, with combined source and resource files in the directories, using just the file extension to differentiate. For example, dfdl-csv defines this in build.sbt:

Compile / unmanagedSourceDirectories := Seq(baseDirectory.value / "src")
Compile / unmanagedResourceDirectories := (Compile / unmanagedSourceDirectories).value
Compile / unmanagedSources / includeFilter := "*.java" | "*.scala"
Compile / unmanagedResources / excludeFilter := (Compile / unmanagedSources / includeFilter).value

Test / unmanagedSourceDirectories := Seq(baseDirectory.value / "test")
Test / unmanagedResourceDirectories := (Test / unmanagedSourceDirectories).value
Test / unmanagedSources / includeFilter := "*.java" | "*.scala"
Test / unmanagedResources / excludeFilter := (Test / unmanagedSources / includeFilter).value

We should have a single option that can be set in build.sbt to enable these settings so that we don't have to copy/paste this logic when we want a flattened layout.