[GIS] use GeoTools with Gradle

geotoolsjavapostgisshapefile

I am going to implement shapefile uploading from a webform, and ingestion into PostGIS.

One problem I am having is that my project is using Gradle for dependency management.

I am unfamiliar with Gradle and have no idea how to find the right string to get the jars into my project.

Best Answer

GeoTools doesn't seem to exist in maven Central (http://mvnrepository.com/) so you would have to add a repository configuration to your build:

repositories {
   maven {
     url "http://download.osgeo.org/webdav/geotools/"
   }
 }

The syntax for the dependencies is something like:

compile group: 'org.geotools', name: 'gt-shapefile', version: '11-SNAPSHOT'