Skip to content

Commit 19e5d62

Browse files
committed
redundantly configure each language component subproject
1 parent da15f56 commit 19e5d62

File tree

11 files changed

+152
-32
lines changed

11 files changed

+152
-32
lines changed

marytts-languages/build.gradle renamed to buildSrc/src/main/groovy/GenerateComponentXmlDescriptor.groovy

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
evaluationDependsOn(':marytts-runtime')
2-
3-
configure(subprojects.findAll { it.name in childProjects }) {
4-
apply from: "$rootDir/buildLogic.gradle"
5-
apply from: "$rootDir/testLogic.gradle"
6-
apply from: "$rootDir/publishLogic.gradle"
7-
8-
dependencies {
9-
compile project(':marytts-runtime')
10-
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
11-
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
12-
}
13-
14-
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
15-
16-
rootProject.distributions.main.contents {
17-
from generateComponentXmlDescriptor, {
18-
into 'installed'
19-
}
20-
}
21-
}
22-
23-
import groovy.xml.*
1+
import groovy.xml.StreamingMarkupBuilder
2+
import groovy.xml.XmlUtil
3+
import org.gradle.api.DefaultTask
4+
import org.gradle.api.tasks.Input
5+
import org.gradle.api.tasks.OutputFiles
6+
import org.gradle.api.tasks.TaskAction
247

258
class GenerateComponentXmlDescriptor extends DefaultTask {
269

@@ -54,7 +37,7 @@ class GenerateComponentXmlDescriptor extends DefaultTask {
5437
[locales, getXmlFiles()].transpose().each { locale, xmlFile ->
5538
def xmlStr = new StreamingMarkupBuilder().bind {
5639
'marytts-install'(xmlns: 'http://mary.dfki.de/installer') {
57-
language(locale: "$locale", name: locale.toLanguageTag(), version: project.version) {
40+
language(locale: "$locale", name: locale.toLanguageTag(), version: project.version) {
5841
delegate.description("${locale.getDisplayName(Locale.US)} language component")
5942
license(href: 'http://www.gnu.org/licenses/lgpl-3.0-standalone.html')
6043
'package'(filename: "marytts-lang-$locale-${project.version}.zip", md5sum: 'dummy', size: 0)

marytts-languages/marytts-lang-de/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
apply from: "$rootDir/buildLogic.gradle"
2+
apply from: "$rootDir/testLogic.gradle"
3+
apply from: "$rootDir/publishLogic.gradle"
4+
15
repositories {
26
ivy {
37
url 'http://opennlp.sourceforge.net'
@@ -12,12 +16,23 @@ configurations {
1216
}
1317

1418
dependencies {
19+
compile project(':marytts-runtime')
1520
opennlp group: 'org.apache.opennlp', name: 'de-pos-maxent', version: '1.5', ext: 'bin'
1621
runtime group: 'de.dfki.mary', name: 'marytts-lexicon-de', version: '0.1.0'
22+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
23+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
1724
}
1825

1926
processResources {
2027
from configurations.opennlp, {
2128
into "marytts/language/de/tagger"
2229
}
2330
}
31+
32+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
33+
34+
rootProject.distributions.main.contents {
35+
from generateComponentXmlDescriptor, {
36+
into 'installed'
37+
}
38+
}

marytts-languages/marytts-lang-en/build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
apply from: "$rootDir/buildLogic.gradle"
2+
apply from: "$rootDir/testLogic.gradle"
3+
apply from: "$rootDir/publishLogic.gradle"
4+
15
repositories {
26
ivy {
37
url 'http://opennlp.sourceforge.net'
@@ -12,10 +16,13 @@ configurations {
1216
}
1317

1418
dependencies {
19+
compile project(':marytts-runtime')
1520
opennlp group: 'org.apache.opennlp', name: 'en-pos-maxent', version: '1.5', ext: 'bin'
1621
runtime group: 'de.dfki.mary', name: 'marytts-lexicon-en_US-cmudict', version: '0.1.0'
1722
testCompile libs.testng
1823
testCompile libs.xmlunit
24+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
25+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
1926
}
2027

2128
processResources {
@@ -28,6 +35,12 @@ test {
2835
useTestNG()
2936
}
3037

31-
generateComponentXmlDescriptor {
38+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor) {
3239
locales = ['en-US', 'en-GB']
3340
}
41+
42+
rootProject.distributions.main.contents {
43+
from generateComponentXmlDescriptor, {
44+
into 'installed'
45+
}
46+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1+
apply from: "$rootDir/buildLogic.gradle"
2+
apply from: "$rootDir/testLogic.gradle"
3+
apply from: "$rootDir/publishLogic.gradle"
4+
15
dependencies {
6+
compile project(':marytts-runtime')
27
runtime group: 'de.dfki.mary', name: 'marytts-lexicon-fr', version: '0.1.0'
38
testCompile libs.testng
49
testCompile libs.xmlunit
10+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
11+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
512
}
613

714
test {
815
useTestNG()
916
}
17+
18+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
19+
20+
rootProject.distributions.main.contents {
21+
from generateComponentXmlDescriptor, {
22+
into 'installed'
23+
}
24+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1+
apply from: "$rootDir/buildLogic.gradle"
2+
apply from: "$rootDir/testLogic.gradle"
3+
apply from: "$rootDir/publishLogic.gradle"
4+
15
dependencies {
6+
compile project(':marytts-runtime')
27
runtime group: 'de.dfki.mary', name: 'marytts-lexicon-it', version: '0.1.0'
38
testCompile libs.testng
9+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
10+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
411
}
512

613
test {
714
useTestNG()
815
}
16+
17+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
18+
19+
rootProject.distributions.main.contents {
20+
from generateComponentXmlDescriptor, {
21+
into 'installed'
22+
}
23+
}

marytts-languages/marytts-lang-lb/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,30 @@ plugins {
22
id 'groovy'
33
}
44

5+
apply from: "$rootDir/buildLogic.gradle"
6+
apply from: "$rootDir/testLogic.gradle"
7+
apply from: "$rootDir/publishLogic.gradle"
8+
59
dependencies {
10+
compile project(':marytts-runtime')
611
compile project(':marytts-languages:marytts-lang-fr')
712
compile libs.groovy
813
runtime group: 'de.dfki.mary', name: 'marytts-lexicon-lb', version: '0.1.0'
914
testCompile libs.testng
1015
testCompile libs.xmlunit
16+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
17+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
1118
}
1219

1320
test {
1421
useTestNG()
1522
systemProperty 'lb.userdict', "$rootDir/src/main/dist/user-dictionaries/userdict-lb.txt"
1623
}
24+
25+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
26+
27+
rootProject.distributions.main.contents {
28+
from generateComponentXmlDescriptor, {
29+
into 'installed'
30+
}
31+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1+
apply from: "$rootDir/buildLogic.gradle"
2+
apply from: "$rootDir/testLogic.gradle"
3+
apply from: "$rootDir/publishLogic.gradle"
4+
15
dependencies {
6+
compile project(':marytts-runtime')
27
runtime group: 'de.dfki.mary', name: 'marytts-lexicon-ru', version: '0.1.0'
38
testCompile libs.testng
9+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
10+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
411
}
512

613
test {
714
useTestNG()
815
}
16+
17+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
18+
19+
rootProject.distributions.main.contents {
20+
from generateComponentXmlDescriptor, {
21+
into 'installed'
22+
}
23+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apply from: "$rootDir/buildLogic.gradle"
2+
apply from: "$rootDir/testLogic.gradle"
3+
apply from: "$rootDir/publishLogic.gradle"
4+
5+
dependencies {
6+
compile project(':marytts-runtime')
7+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
8+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
9+
}
10+
11+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
12+
13+
rootProject.distributions.main.contents {
14+
from generateComponentXmlDescriptor, {
15+
into 'installed'
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apply from: "$rootDir/buildLogic.gradle"
2+
apply from: "$rootDir/testLogic.gradle"
3+
apply from: "$rootDir/publishLogic.gradle"
4+
5+
dependencies {
6+
compile project(':marytts-runtime')
7+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
8+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
9+
}
10+
11+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
12+
13+
rootProject.distributions.main.contents {
14+
from generateComponentXmlDescriptor, {
15+
into 'installed'
16+
}
17+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
apply from: "$rootDir/buildLogic.gradle"
2+
apply from: "$rootDir/testLogic.gradle"
3+
apply from: "$rootDir/publishLogic.gradle"
4+
15
dependencies {
6+
compile project(':marytts-runtime')
27
runtime group: 'de.dfki.mary', name: 'marytts-lexicon-tr', version: '0.1.0'
8+
testCompile project(path: ':marytts-runtime', configuration: 'testCompile')
9+
integrationTestCompile project(':marytts-runtime').sourceSets.test.output
10+
}
11+
12+
task generateComponentXmlDescriptor(type: GenerateComponentXmlDescriptor)
13+
14+
rootProject.distributions.main.contents {
15+
from generateComponentXmlDescriptor, {
16+
into 'installed'
17+
}
318
}

0 commit comments

Comments
 (0)