diff --git a/README.md b/README.md index 3025a50f9..1a2910ef7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Copyright (c) 2007-2016 The Board of Trustees of The Leland Stanford Junior Univ ## Installation We use [Gradle](http://gradle.org) to build Phrasal. Gradle will -install all dependencies. You need Gradle version 2.1+. +install all dependencies. You need Gradle version 7.2+. If you are on OS X, the easiest way to get Gradle is to install Homebrew and then to type `brew install gradle`. @@ -31,7 +31,7 @@ usually the default shell. ### Windows -Follow the Linux instructions above. Then be sure to execute `gradle startupScripts` to generate a .bat file. +Follow the Linux instructions above. Then be sure to execute `gradle startScripts` to generate a .bat file. ## Citation @@ -41,7 +41,7 @@ If you use Phrasal for research, then please cite the following paper: @inproceedings{Green2014, author = {Spence Green and Daniel Cer and Christopher D. Manning}, title = {Phrasal: A Toolkit for New Directions in Statistical Machine Translation}, - booktitle = {In Proceddings of the Ninth Workshop on Statistical Machine Translation}, + booktitle = {In Proceedings of the Ninth Workshop on Statistical Machine Translation}, year = {2014} } ``` diff --git a/build.gradle b/build.gradle index bcd55a9ce..39d52c07a 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,7 @@ apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'application' apply plugin: 'idea' +apply plugin: 'maven-publish' // Gradle java plugin sourceCompatibility = 1.8 @@ -22,16 +23,18 @@ applicationDefaultJvmArgs = ["-ea", "-server", "-XX:+UseParallelGC", "-XX:+UsePa jar { manifest { attributes 'Implementation-Title': 'Stanford Phrasal', - 'Implementation-Version': version, + 'Implementation-Version': archiveVersion.get(), 'Main-Class': 'edu.stanford.nlp.mt.Phrasal' } } -uploadArchives { - repositories { - flatDir { - dirs 'repos' - } +publishing { + publications { + maven(MavenPublication) { + groupId = 'edu.stanford.nlp' + artifactId = 'Stanford Phrasal' + version = '3.6.0' + } } } @@ -93,41 +96,43 @@ repositories { mavenCentral() } -task listDeps << { - configurations.compile.each { File file -> println file.name } +task listDeps { + doLast { + configurations.implementation.api.each { File file -> println file.name } + } } task copyDeps(type: Copy) { - from configurations.runtime + from configurations.runtimeClasspath into 'lib' } dependencies { // TERp jars that are no longer available on the web. - compile fileTree(dir: 'lib', include: '*.jar') + implementation fileTree(dir: 'lib', include: '*.jar') // lilt/core Maven dependencies - compile group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: '3.6.0' - compile group: 'com.esotericsoftware', name: 'kryo', version: '3.0.1' - compile group: 'it.unimi.dsi', name: 'fastutil', version: '7.0.12' - compile group: 'com.google.guava', name: 'guava', version: '19.0' - compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.7' - compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.7' - compile group: 'com.lmax', name: 'disruptor', version: '3.3.6' + implementation group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: '3.6.0' + implementation group: 'com.esotericsoftware', name: 'kryo', version: '3.0.1' + implementation group: 'it.unimi.dsi', name: 'fastutil', version: '7.0.12' + implementation group: 'com.google.guava', name: 'guava', version: '19.0' + implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.7' + implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.7' + implementation group: 'com.lmax', name: 'disruptor', version: '3.3.6' // Test dependencies - testCompile group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'junit', name: 'junit', version: '4.12' // Extra dependencies - extraCompile sourceSets.main.output - extraCompile sourceSets.test.output - extraCompile configurations.testCompile - extraRuntime configurations.testRuntime - extraCompile group: 'com.google.code.gson', name: 'gson', version: '2.6.2' - extraCompile group: 'org.eclipse.jetty', name: 'jetty-continuation', version: '9.2.1.v20140609' - extraCompile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.2.1.v20140609' - extraCompile group: 'org.eclipse.jetty', name: 'jetty-annotations', version: '9.2.1.v20140609' - extraCompile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.2.1.v20140609' + extraImplementation sourceSets.main.output + extraImplementation sourceSets.test.output + extraImplementation configurations.testImplementation + extraRuntimeOnly configurations.testRuntimeOnly + extraImplementation group: 'com.google.code.gson', name: 'gson', version: '2.6.2' + extraImplementation group: 'org.eclipse.jetty', name: 'jetty-continuation', version: '9.2.1.v20140609' + extraImplementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.2.1.v20140609' + extraImplementation group: 'org.eclipse.jetty', name: 'jetty-annotations', version: '9.2.1.v20140609' + extraImplementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.2.1.v20140609' } // Eclipse plugin setup @@ -148,11 +153,10 @@ eclipse { buildscript { repositories { mavenCentral() - jcenter() } dependencies { classpath 'org.owasp:dependency-check-gradle:1.4.2' - classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0' + classpath 'com.github.ben-manes:gradle-versions-plugin:0.11.1' } } apply plugin: 'com.github.ben-manes.versions'