apply plugin: RiskscapePluginProjectPlugin

riskscapePlugin {
  implementation = 'nz.org.riskscape.cpython.CPythonPlugin'
  pluginResources = ['lib/rs2CPyAdaptor.py', 'lib/rs2CPyExecAdaptor.py', 'lib/adapter.py', 'lib/serializer.py', 'lib/checkPython.py']
  enabledByDefault = true
}

dependencies {
  testImplementation project(':engine:app')
  testImplementation project(':engine:app').sourceSets.test.output
  testImplementation project(':plugin:defaults')
  testImplementation project(':test:engine-harness')
  testImplementation project(':test:functional').sourceSets.test.output
  plugin 'org.apache.commons:commons-pool2:2.11.1'
}

test {
  useJUnit {
    excludeCategories 'nz.org.riskscape.cpython.CPythonTestMarker'
    excludeCategories 'nz.org.riskscape.engine.cli.CliIntegrationTest'
  }
  testLogging {
    showStandardStreams = true
  }
}

task(cpythonTest, type: Test, dependsOn: compileTestJava) {

  outputs.upToDateWhen {
    // always run tests
    false
  }
  useJUnit {
    includeCategories 'nz.org.riskscape.cpython.CPythonTestMarker'
  }
  testLogging {
      showStandardStreams = true
  }
}

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