-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
164 lines (140 loc) · 4.78 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
plugins {
id "com.jfrog.bintray" version "1.7.1"
id "com.github.ManifestClasspath" version "0.1.0-RELEASE" //for fixing too long classpath on windows
}
apply plugin: 'scala'
apply plugin: 'java-library'
apply plugin: 'idea'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
jcenter()
}
task recognize(dependsOn: 'classes', type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'ru.ispras.atr.AutomaticTermsRecognizer'
new File("$atr_recognize_wd").mkdirs()
workingDir = "$atr_recognize_wd"
jvmArgs = ["-Xmx${atr_recognize_xmx}"]
if (project.hasProperty("dataset") && project.hasProperty("topCount")) {
if (project.hasProperty("config")) {
if (project.hasProperty("output"))
args([dataset, topCount, config, output])
else
args([dataset, topCount, config])
} else {
args([dataset, topCount])
}
} else {
args = []
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4.1' //version required
}
def artifactName = 'atr4s'
def siteUrl = 'https://github.com/ispras/' + artifactName // Homepage URL of the library
def gitUrl = 'https://github.com/ispras/' + artifactName + '.git' // Git repository URL
def artifactVersion = '1.2.2'
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: scaladoc) {
classifier = 'javadoc'
from scaladoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id "astrakhantsev"
name "Nikita Astrakhantsev"
email "[email protected]"
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId 'ru.ispras'
artifactId artifactName
version artifactVersion
pom.withXml {
def root = asNode()
root.appendNode('description', 'Toolkit with State-of-the-art Automatic Terms Recognition Methods in Scala')
root.appendNode('name', 'Automatic Term Recognition in Scala')
root.appendNode('url', siteUrl)
root.children().last() + pomConfig
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? bintrayUser : ''
key = project.hasProperty('bintrayApiKey') ? bintrayApiKey : ''
publications = ['MyPublication']
publish = true //If version should be auto published after an upload
override = true
pkg {
repo = 'maven'
name = artifactName
userOrg = 'ispras'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/ispras/atr4s.git'
version {
name = artifactVersion
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
}
}
}
}
compileScala {
scalaCompileOptions.additionalParameters = ["-feature"]
}
dependencies {
compile 'org.scala-lang:scala-library:2.11.7'
// Emory nlp preprocessing
compile group: 'edu.emory.mathcs.nlp', name: 'nlp4j-api', version: '1.1.3'
compile group: 'edu.emory.mathcs.nlp', name: 'nlp4j-english', version: '1.1.3'
// Apache OpenNLP preprocessing
compile group: 'org.apache.opennlp', name: 'opennlp-tools', version: '1.6.0'
//for PU-ATR
compile 'ru.ispras:pu4spark:0.3'
//for PU-ATR and Voting
compile group: 'org.apache.spark', name: 'spark-core_2.11', version: '1.6.2'
// for ranking by windows
compile 'org.apache.spark:spark-hive_2.11:1.6.2'
//for NovelTopicModel (topic modeling itself)
compile 'ru.ispras.modis:tm_2.11:1.0'
// spire for word2vec-scala
//for KeyConceptRelatedness (namely, for spire for word2vec-scala)
compile 'org.spire-math:spire_2.11:0.11.0'
//stemmer for word2vec (phrases)
compile "com.github.rholder:snowball-stemmer:1.3.0.581.1"
//for unit test
compile 'org.scalatest:scalatest_2.11:2.2.6'
compile 'com.databricks:spark-csv_2.11:1.4.0'
//log utils - currently it is preferred to old log4j for evaluation only (withExtraAppender)
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.4'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.4'
}