-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
150 lines (119 loc) · 3.57 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
plugins {
id "com.jfrog.bintray" version "1.8.0"
}
////////////////////////////////////////////////////////////////// SCRIPT DEPENDENCY FOR ANTLR4 PLUGIN
repositories {
jcenter()
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'antlr'
apply plugin: 'signing'
apply plugin: 'maven-publish'
///////////////////////////////////////////////////////////////// CONFIGURATION
group = 'fr.univ-nantes.julestar'
archivesBaseName = 'uima-tokens-regex'
version = '2.2.2'
////////////////////////////////////////////////////////////////// DEPENDENCIES
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
if(hasProperty("signing.keyId")) {
// activate signing of artifacts, only if signing is configured properly
signing {
sign configurations.archives
}
}
dependencies {
antlr "org.antlr:antlr4:4.7"
// Logging
compile "org.slf4j:slf4j-api:1.7.25"
// Tests
testCompile "com.fasterxml.jackson.core:jackson-databind:2.5.2"
testCompile "junit:junit:4.12"
testCompile "eu.codearte.catch-exception:catch-exception:1.4.1"
testCompile "org.assertj:assertj-core:2.0.0"
testCompile "org.mockito:mockito-all:1.10.19"
testCompile "org.apache.uima:uimaj-tools:2.8.1"
testCompile "fr.univ-nantes.julestar:uima-test:1.0.0"
testCompile 'ch.qos.logback:logback-classic:1.2.3'
// UIMA
compile 'org.apache.uima:uimaj-core:2.10.0'
compile "org.apache.uima:uimafit-core:2.3.0"
compile 'com.google.guava:guava:21.0'
// Resource formats
compile 'com.fasterxml.jackson.core:jackson-core:2.9.2'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.2'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.2'
// Antlr
runtime "org.antlr:antlr4-runtime:4.7"
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
publishing {
publications {
maven(MavenPublication) {
groupId group
artifactId archivesBaseName
version version
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
}
////////////////////////////////////////////////////////////////// ANTLR4
generateGrammarSource {
/*
* Puts generated sources under src/main/java in order to
* ease the integration with any IDE.
*/
outputDirectory = new File("src/main/java/fr/univnantes/lina/uima/tkregex/antlr/generated")
}
task jcasgenTest(type: JavaExec) {
description = 'Generate UIMA TS classes'
ext.srcFile = file("$projectDir/src/test/resources/TestTypeSystem.xml")
ext.outputDir = file("$projectDir/src/test/java")
inputs.file srcFile
outputs.dir outputDir
println "src: $srcFile"
println "output: $outputDir"
classpath configurations.testCompile
// This ensures availability of type system imports
// however, assumes that files are in desc subfolder
systemProperty 'uima.datapath', "$projectDir/desc"
main = 'org.apache.uima.tools.jcasgen.Jg'
args = ['-jcasgeninput', srcFile, '-jcasgenoutput', outputDir]
}
compileTestJava.dependsOn jcasgenTest
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['maven']
publish = true
override = true
pkg {
repo = 'maven'
name = 'fr.univ-nantes.julestar:uima-tokens-regex'
userOrg = 'pompadour'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/nantesnlp/uima-tokens-regex.git'
version {
name = project.property("version")
desc = "UIMA Tokens Regex " + project.property("version")
released = new Date()
}
}
}