plugins {
  id "net.consensys.zkevm.kotlin-library-conventions"
}

dependencies {
  implementation(project(":coordinator:core"))
  implementation(project(":coordinator:ethereum:gas-pricing"))
  implementation project(':jvm-libs:generic:extensions:kotlin')
  implementation project(':jvm-libs:linea:core:domain-models')
  implementation project(':jvm-libs:generic:vertx-helper')
  implementation project(':jvm-libs:linea:web3j-extensions')
  implementation project(':jvm-libs:generic:json-rpc')

  testImplementation("io.vertx:vertx-junit5")
  testImplementation "org.wiremock:wiremock:${libs.versions.wiremock.get()}"
  testImplementation project(':jvm-libs:linea:metrics:micrometer')

  testImplementation project(':coordinator:clients:smart-contract-client')
}

sourceSets {
  integrationTest {
    kotlin {
      compileClasspath += main.output
      runtimeClasspath += main.output
    }
    java {
      compileClasspath += main.output
      runtimeClasspath += main.output
    }
    compileClasspath += sourceSets.main.output + sourceSets.main.compileClasspath + sourceSets.test.compileClasspath
    runtimeClasspath += sourceSets.main.output + sourceSets.main.runtimeClasspath + sourceSets.test.runtimeClasspath
  }
}

task integrationTest(type: Test) { test ->
  description = "Runs integration tests."
  group = "verification"
  useJUnitPlatform()

  classpath = sourceSets.integrationTest.runtimeClasspath
  testClassesDirs = sourceSets.integrationTest.output.classesDirs
  dependsOn(":localStackComposeUp")
}
