-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
75 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ compileJava.options.encoding = 'UTF-8' | |
group = 'ua.net.nlp' | ||
ext.artifactId = 'nlp_uk' | ||
|
||
ext.statsArtifactId="${artifactId}-stats" | ||
ext.statsJarName="${statsArtifactId}-${project.version}" | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
|
@@ -106,29 +109,6 @@ eclipse { | |
} | ||
} | ||
|
||
task downloadResources(type: JavaExec) { | ||
classpath = sourceSets.main.runtimeClasspath | ||
mainClass = "ua.net.nlp.tools.tag.TagTextCore" | ||
args "--download" | ||
|
||
// ugly hack - downloadResources depends on compiling and thus processResources | ||
// but after the download we need to call/force processResources again | ||
// TODO: find how to do it nicely | ||
// for now - just copy the files manually | ||
doLast { | ||
def outputDir = tasks.processResources.outputs.files.files.iterator().next() | ||
File semtags = new File(outputDir, "/ua/net/nlp/tools/semtags") | ||
semtags.mkdirs() | ||
File stats = new File(outputDir, "/ua/net/nlp/tools/stats") | ||
stats.mkdirs() | ||
tasks.processResources.inputs.files.files | ||
.findAll { File file -> file.name =~ /\.(csv|txt)$/ } | ||
.each { File file -> | ||
def toDir = file.path.contains("semtag") ? semtags : stats | ||
Files.copy(file.toPath(), new File(toDir, file.name).toPath(), StandardCopyOption.REPLACE_EXISTING) | ||
} | ||
} | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
|
@@ -216,6 +196,14 @@ jar { | |
exclude("ua/net/nlp/tools/StressText.class") | ||
} | ||
|
||
task statsJar(type: Jar) { | ||
setArchiveFileName "${statsJarName}.jar" | ||
version=statsVersion | ||
|
||
from('src/main/resources') { | ||
include '/ua/net/nlp/tools/stats/*.txt' | ||
} | ||
} | ||
|
||
task sourceJar(type: Jar) { | ||
archiveClassifier = "sources" | ||
|
@@ -236,7 +224,7 @@ if( project.hasProperty("ossrhUsername") ) { | |
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
mainJar(MavenPublication) { | ||
// groupId = group | ||
artifactId = artifactId | ||
// version = version | ||
|
@@ -274,6 +262,43 @@ publishing { | |
url = "https://github.com/brown-uk/nlp_uk.git" | ||
} | ||
} | ||
|
||
} | ||
|
||
statsJarPublication(MavenPublication) { | ||
artifact statsJar { | ||
// classifier = 'stats' | ||
} | ||
// groupId = 'com.example' | ||
artifactId = statsArtifactId | ||
version=statsVersion | ||
|
||
pom { | ||
name = 'NLP Stats for Ukrainian' | ||
description = 'NLP statistic files for Ukrainian language' | ||
|
||
url = "https://github.com/brown-uk/nlp_uk" | ||
|
||
licenses { | ||
license { | ||
name = 'GNU General Public License v3' | ||
url = 'https://www.gnu.org/licenses/gpl-3.0.txt' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'arysin' | ||
name = 'Andriy Rysin' | ||
email = '[email protected]' | ||
} | ||
} | ||
|
||
scm { | ||
url = "https://github.com/brown-uk/nlp_uk.git" | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# for LT snapshots we can use https://repo.languagetool.org/ui/native/languagetool-os-snapshot | ||
ltBaseVersion=6.5-SNAPSHOT | ||
ltDevVersion=6.5-SNAPSHOT | ||
morfologik_ukrainian_lt_version=6.5.1-SNAPSHOT | ||
morfologik_ukrainian_lt_version=6.5.1 | ||
groovyVersion=4.0.22 | ||
# nlp_uk version | ||
version=3.3.2-SNAPSHOT | ||
version=3.3.5-SNAPSHOT | ||
statsVersion=3.3.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.