Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timo/gradlified #200

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
315 changes: 301 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
### PROJECT-SPECIFIC

lib
fig
sfig
refdb
virtuoso-opensource

classes
libsempre
sempre.jar
module-classes.txt

state
out
test-output

.project
.classpath
.settings
.idea
semparse.iml
*~
*.swp
*.bak
*.pyc
*.cache
*.DS_Store

java.hprof.txt

# Don't put papers here
Expand All @@ -44,3 +33,301 @@ interactive/.ipynb_checkpoints
# Community server logs
community-server/data
community-server/data-backup


# Ignore all Eclipse project files because importing via Gradle is more consistent
.classpath
.project
# Ignore all JetBrains project files because importing via Gradle is more consistent
.idea/
*.iml


### https://github.com/github/gitignore
## JAVA <https://github.com/github/gitignore/blob/master/Java.gitignore>
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


## GRADLE <https://github.com/github/gitignore/blob/master/Gradle.gitignore>
.gradle
/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties


## ECLIPSE <https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore>
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# CDT- autotools
.autotools

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet


## JETBRAINS <https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore>
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/dictionaries
.idea/**/shelf

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/
cmake-build-release/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests


## MACOS <https://github.com/github/gitignore/blob/master/Global/macOS.gitignore>
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


# PYTHON <https://github.com/github/gitignore/blob/master/Python.gitignore>
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
56 changes: 56 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
plugins {
id 'maven'
id 'application'
id 'java'
}

group = 'com.github.timobaumann'

repositories {
jcenter()
mavenCentral()
maven { url "https://www.jitpack.io" }
}

dependencies {
compile group: 'com.google.guava', name: 'guava', version: '23.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonXmlVersion}"
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonXmlVersion}"
compile group: 'jline', name: 'jline', version: '2.14.6'
compile group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: "${corenlpVersion}"
runtime group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: "${corenlpVersion}", classifier: 'models'
runtime group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: "${corenlpVersion}", classifier: 'models-english'
compile group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
compile group: 'com.opencsv', name: 'opencsv', version: '4.1'
compile group: 'com.github.percyliang', name: 'fig', version: 'master-SNAPSHOT'

testCompile group: 'org.testng', name: 'testng', version: '6.14.3'
testCompile group: 'junit', name: 'junit', version: '4.12'
testRuntime(group: 'org.slf4j', name: 'slf4j-simple', version: "${slf4jVersion}") {
// Software that depends on this project may have their own SLF4J implementation; avoid having more than one SLF4J implementation on the classpath
transitive = false
}
}



test {
useTestNG()
exclude 'edu/stanford/nlp/sempre/interactive/test/**'
exclude 'edu/stanford/nlp/sempre/freebase/test/SparqlExecutorTest.class' // freebase web access is not available anymore
exclude 'edu/stanford/nlp/sempre/overnight/test/SimpleWorldTest.class' // you need to copy overnight/unittest.db to lib/data/overnight/test/unittest.db for this to work.
}

// this will only run on POSIX-compatible OSs. Sorry Windows.
task extractModuleClasses(type:Exec) {
commandLine 'bash', '-c', './scripts/extract-module-classes.rb && mkdir -p src/main/resources/edu/stanford/nlp/sempre/ && cp module-classes.txt src/main/resources/edu/stanford/nlp/sempre/'
}
run.dependsOn extractModuleClasses

distZip.enabled = false
distTar.enabled = false
configurations.archives.artifacts.removeAll{it.file =~ 'zip'}
configurations.archives.artifacts.removeAll{it.file =~ 'tar'}


mainClassName = 'edu.stanford.nlp.sempre.Main'
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
corenlpVersion = 3.7.0
jacksonXmlVersion = 2.9.5
slf4jVersion = 1.7.25
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Loading