mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
Hopefully fixed concurrent compilation issue (#82)
* Hopefully fixed concurrent compilation issue * Removed contracts helper dependency * Turned runRootMakefileCommand into a function rather than an extension
This commit is contained in:
@@ -6,6 +6,7 @@ import java.time.Duration
|
||||
import java.time.Instant
|
||||
|
||||
plugins {
|
||||
id 'net.consensys.zkevm.linea-contracts-helper'
|
||||
alias(libs.plugins.spotless)
|
||||
alias(libs.plugins.docker)
|
||||
}
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
if (!rootProject.tasks.getNames().contains("compileContracts")) {
|
||||
rootProject.tasks.register("compileContracts") {
|
||||
description = "Compiles contracts."
|
||||
inputs.dir("$rootDir/contracts/contracts")
|
||||
outputs.cacheIf { true }
|
||||
|
||||
tasks.register('compileContracts') {
|
||||
description = "Compiles contracts."
|
||||
inputs.dir("$rootDir/contracts")
|
||||
outputs.cacheIf { true }
|
||||
doLast {
|
||||
runRootMakefileCommand("compile-contracts", Map.of())
|
||||
doLast {
|
||||
runRootMakefileCommand("compile-contracts", Map.of())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ext.runRootMakefileCommand = { String command, Map<String, String> env ->
|
||||
def runRootMakefileCommand(String command, Map<String, String> env) {
|
||||
def randomSuffix = UUID.randomUUID().toString()
|
||||
File outputFile = file("${command.replace(" ", "-")}-run-output-${randomSuffix}.txt")
|
||||
def deploymentProcessBuilder = new ProcessBuilder("make", "-C", project.rootDir.path, command)
|
||||
|
||||
@@ -3,7 +3,6 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
plugins {
|
||||
id 'net.consensys.zkevm.kotlin-library-conventions'
|
||||
id 'net.consensys.zkevm.linea-contracts-helper'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -62,7 +61,7 @@ task integrationTest(type: Test) {
|
||||
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
||||
|
||||
dependsOn(":localStackComposeUp")
|
||||
dependsOn(compileContracts)
|
||||
dependsOn(rootProject.tasks.compileContracts)
|
||||
|
||||
testLogging {
|
||||
events TestLogEvent.FAILED,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id "net.consensys.zkevm.kotlin-library-conventions"
|
||||
id 'net.consensys.zkevm.linea-contracts-helper'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -42,7 +41,7 @@ task integrationTest(type: Test) {
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
||||
dependsOn(":localStackComposeUp")
|
||||
dependsOn(compileContracts)
|
||||
dependsOn(rootProject.tasks.compileContracts)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id 'net.consensys.zkevm.kotlin-library-conventions'
|
||||
id 'net.consensys.zkevm.linea-contracts-helper'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -44,5 +43,5 @@ task integrationTest(type: Test) {
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
||||
dependsOn(":localStackComposeUp")
|
||||
dependsOn(compileContracts)
|
||||
dependsOn(rootProject.tasks.compileContracts)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
plugins {
|
||||
id 'net.consensys.zkevm.kotlin-library-conventions'
|
||||
id 'net.consensys.zkevm.linea-contracts-helper'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -42,7 +41,7 @@ task integrationTest(type: Test) {
|
||||
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
||||
|
||||
dependsOn(":localStackComposeUp")
|
||||
dependsOn(compileContracts)
|
||||
dependsOn(rootProject.tasks.compileContracts)
|
||||
testLogging {
|
||||
events TestLogEvent.FAILED,
|
||||
TestLogEvent.SKIPPED,
|
||||
|
||||
Reference in New Issue
Block a user