Skip to content

Commit

Permalink
Merge pull request #35 from psibre/fix-source-generation
Browse files Browse the repository at this point in the history
Fix source generation
  • Loading branch information
psibre authored Dec 18, 2022
2 parents 7af8605 + 95f1bca commit 80a797e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Gradle MaryTTS Component Plugin

- Group to all tasks

### Fixed

- Downstream failures when wrong template unpacking configuration produced `null` source files
- Failures in generated integration tests, when non-namespaced `name` property is loaded from other MaryConfigs

### Changed

- [all changes since v0.3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class UnpackSourceTemplates extends DefaultTask {
void unpack() {
resourceNames.get().each { resourceName ->
destDir.file(resourceName).get().asFile.withWriter {
it << this.class.getResourceAsStream(resourceName)
def resource = this.class.getResourceAsStream(resourceName)
assert resource: "Source template $resourceName could not be found for unpacking"
it << resource
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/de/dfki/mary/tasks/IntegrationTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ${project.marytts.component.config.collect { key, value ->
public void canGetProperty(name, expected) {
def actual
switch (name) {
case 'name':
break
case ~/.+\\.list\$/:
actual = MaryProperties.getList(name)
assert actual.containsAll(expected)
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/de/dfki/mary/LoadHelloIT.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class LoadHelloIT {
public void canGetProperty(name, expected) {
def actual
switch (name) {
case 'name':
break
case ~/.+\.list$/:
actual = MaryProperties.getList(name)
assert actual.containsAll(expected)
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/de/dfki/mary/LoadMyComponentIT.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class LoadMyComponentIT {
public void canGetProperty(name, expected) {
def actual
switch (name) {
case 'name':
break
case ~/.+\.list$/:
actual = MaryProperties.getList(name)
assert actual.containsAll(expected)
Expand Down

0 comments on commit 80a797e

Please sign in to comment.