plugins {
  id 'java-library'
  id 'linea.web3j-codegen'
}
java {
  toolchain {
    languageVersion = JavaLanguageVersion.of(21)
  }
}

description = 'Web3J Java client for Linea L2 Message Service Contract'
ext.artifactId = 'l2-message-service-contract-client'

dependencies {
  // this shall be very lightweight dependency, just export the generated sources
  compileOnly("org.web3j:core:${libs.versions.web3j.get()}") {
    exclude group: 'org.slf4j', module: 'slf4j-nop'
  }
}

web3jContractWrappers {
  def contractAbi = layout.buildDirectory.dir("${rootProject.projectDir}/contracts/abi").get()
      .file("L2MessageServiceV1.0.abi").asFile.absolutePath

  contractsPackage = "net.consensys.linea.contract"
  contracts = ["$contractAbi": "L2MessageService"]
}
