apply plugin: RiskscapePluginProjectPlugin

riskscapePlugin {
  implementation = 'nz.org.riskscape.postgis.Plugin'
  // the default plugin has some of the base jdbc code that this plugin relies upon
  depends = ['defaults']
}

dependencies {
  implementation project(':plugin:defaults')
  plugin group: 'org.geotools', name: 'gt-jdbc', version: project.property('geotoolsVersion')
  // https://mvnrepository.com/artifact/commons-dbcp/commons-dbcp
  plugin group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4'
  plugin group: 'org.geotools', name: 'gt-jdbc', version: project.property('geotoolsVersion')
  plugin group: 'org.geotools.jdbc', name: 'gt-jdbc-postgis', version: project.property('geotoolsVersion')
}

test {
  useJUnit {
    excludeCategories 'nz.org.riskscape.postgis.PostGISIntegrationTestMarker'
  }
  testLogging {
    showStandardStreams = true
  }
}

task(integrationTest, type: Test, dependsOn: compileTestJava) {
  outputs.upToDateWhen {
    // always run tests
    false
  }
  useJUnit {
    includeCategories 'nz.org.riskscape.postgis.PostGISIntegrationTestMarker'
  }
  testLogging {
      showStandardStreams = true
  }
}
