-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
36 lines (30 loc) · 946 Bytes
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
plugins {
id "de.undercouch.download" version "3.0.0"
}
apply plugin: 'java'
apply plugin: 'idea'
//apply plugin: 'application'
//run.doFirst {
//
//}
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
}
import de.undercouch.gradle.tasks.download.Download
tasks.addRule("Pattern: fetchModelsForLang<ID>") { String taskName ->
if(taskName.startsWith("fetchModelsForLang")) {
task(taskName, type: Download) {
description = 'Downloads the models needed to run this for a given language (en, cz, etc.)'
def modelLang = (taskName - 'fetchModelsForLang')
src([
'http://opennlp.sourceforge.net/models-1.5/' + modelLang + '-ner-person.bin',
'http://opennlp.sourceforge.net/models-1.5/' + modelLang + '-pos-maxent.bin'
])
dest 'resources/models'
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}