made LockFile reentrant (multiple locks on the same file can be acquired in the same JVM instance)
Some checks failed
CI / build (push) Has been cancelled

added argument file to JavaProcessBuilder
This commit is contained in:
2025-01-23 18:00:47 +08:00
parent d61cfc6ea7
commit cddd7889c7
8 changed files with 464 additions and 55 deletions

View File

@@ -1,11 +1,15 @@
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 {
@@ -25,7 +29,23 @@ 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')
}