Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
164 lines (140 sloc) 4.78 KB
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 "astrakhantsev@ispras.ru"
}
}
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'
}
You can’t perform that action at this time.