chore: record pre-existing uncommitted repository state
Snapshot of the in-flight state that already existed, identically, in both this worktree and the main checkout before this session began: the initial HTTP Client platform implementation (previously untracked), the redis-lab removal, and the JPA / object-storage / notification integration work. Kept separate from this session's HTTP Client review response, which lands in the following commit, so the two bodies of work stay reviewable apart. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1a3b560678
commit
5f10b791d3
@@ -0,0 +1,56 @@
|
||||
import org.gradle.api.GradleException
|
||||
import org.gradle.api.file.ConfigurableFileCollection
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Classpath
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.process.CommandLineArgumentProvider
|
||||
|
||||
abstract class MockitoAgentArgumentProvider implements CommandLineArgumentProvider {
|
||||
@Classpath
|
||||
abstract ConfigurableFileCollection getMockitoCoreClasspath()
|
||||
|
||||
@Input
|
||||
abstract Property<String> getOwner()
|
||||
|
||||
@Override
|
||||
Iterable<String> asArguments() {
|
||||
List<File> candidates = mockitoCoreClasspath.files.findAll { File file ->
|
||||
file.isFile() && file.name ==~ 'mockito-core-[^/]+\\.jar'
|
||||
}.sort { File left, File right -> left.absolutePath <=> right.absolutePath }
|
||||
|
||||
if (candidates.size() != 1) {
|
||||
throw new GradleException(
|
||||
"${owner.get()}: expected exactly one mockito-core JAR for the test JVM, " +
|
||||
"found ${candidates.size()}: " +
|
||||
candidates.collect { it.absolutePath })
|
||||
}
|
||||
|
||||
File mockitoCore = candidates[0]
|
||||
["-javaagent:${mockitoCore.absolutePath}", '-Xshare:off']
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.subprojects { Project target ->
|
||||
target.pluginManager.withPlugin('java') {
|
||||
target.pluginManager.withPlugin('io.spring.dependency-management') {
|
||||
def mockitoAgentDependencies =
|
||||
target.configurations.dependencyScope('mockitoAgentDependencies')
|
||||
def mockitoAgent = target.configurations.resolvable('mockitoAgent') {
|
||||
description = 'Mockito core JAR used only as a Test JVM startup agent.'
|
||||
extendsFrom(mockitoAgentDependencies.get())
|
||||
transitive = false
|
||||
}
|
||||
|
||||
target.dependencies.add(
|
||||
mockitoAgentDependencies.get().name, 'org.mockito:mockito-core')
|
||||
|
||||
target.tasks.withType(Test).configureEach {
|
||||
def provider = target.objects.newInstance(MockitoAgentArgumentProvider)
|
||||
provider.mockitoCoreClasspath.from(mockitoAgent)
|
||||
provider.owner.set("${target.path}:${name}")
|
||||
jvmArgumentProviders.add(provider)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user