Skip to content

Commit

Permalink
Improved: clarify use of sourceSets in build.gradle
Browse files Browse the repository at this point in the history
Mentions the difference and reason of it for build.gradle sourceSets.
Under main are the integration tests, under tst are the unit tests
  • Loading branch information
JacquesLeRoux committed Apr 7, 2024
1 parent e7081e5 commit 18a1871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def excludedJavaSources = [
]

sourceSets {
// This is for integration tests (DB access)
main {
java {
srcDirs = getDirectoryInActiveComponentsIfExists('src/main/java')
Expand All @@ -254,7 +255,7 @@ sourceSets {
srcDirs += getDirectoryInActiveComponentsIfExists('dtd')
}
}
// This is unit tests. Integration tests must be above because of compilation issues.
// This is for unit tests (no DB access)
test {
java {
srcDirs = getDirectoryInActiveComponentsIfExists('src/test/java')
Expand Down

0 comments on commit 18a1871

Please sign in to comment.