Files
jwo/jwo-test/build.gradle
Walter Oggioni cddd7889c7
Some checks failed
CI / build (push) Has been cancelled
made LockFile reentrant (multiple locks on the same file can be acquired in the same JVM instance)
added argument file to JavaProcessBuilder
2025-01-23 21:36:58 +08:00

52 lines
1.5 KiB
Groovy

plugins {
id 'java-library'
alias(catalog.plugins.lombok)
alias(catalog.plugins.envelope)
}
import org.gradle.api.attributes.LibraryElements
import static org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE
import static org.gradle.api.attributes.LibraryElements.JAR
import net.woggioni.gradle.envelope.EnvelopeJarTask
import net.woggioni.gradle.envelope.EnvelopePlugin
configurations {
testImplementation {
attributes {
attribute(LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.class, JAR))
}
}
testRuntimeClasspath {
attributes {
attribute(LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.class, JAR))
}
}
}
java {
modularity.inferModulePath = true
}
Provider<EnvelopeJarTask> envelopeJarTaskProvider = tasks.named(EnvelopePlugin.ENVELOPE_JAR_TASK_NAME, EnvelopeJarTask.class) {
mainModule = "net.woggioni.jwo.lockfile.test"
mainClass = "net.woggioni.jwo.lockfile.test.LockFileTestMain"
}
dependencies {
implementation rootProject
testImplementation catalog.slf4j.api
testImplementation project(':jwo-test-module')
testImplementation project(':')
testRuntimeOnly catalog.slf4j.simple
}
test {
dependsOn(envelopeJarTaskProvider)
systemProperty('lockFileTest.executable.jar', envelopeJarTaskProvider.flatMap {it.archiveFile}.get().getAsFile())
systemProperty('org.slf4j.simpleLogger.showDateTime', 'true')
}