build(app-bootstrap): 저장소 파일 트리 입력이 폴더 항목을 지문에 넣지 않는다 #59
@@ -345,13 +345,25 @@ def repositoryRootForContractTests = rootProject.projectDir
|
||||
// Nor is the Python bytecode Git ignores: the root testDocumentChecks writes it under scripts/ in the
|
||||
// same build, so with it the lane's fingerprint changed between two runs of one tree and on every
|
||||
// fresh checkout (the files carry their source's modification time).
|
||||
// Every whole-repository file-tree input below also leaves directories out: Gradle then drops every
|
||||
// directory entry, not only empty ones, and keeps the files. :app-bootstrap:test writes
|
||||
// .approval_tests_temp/ here (ApprovalTests' .gitignore, logs and the scripts it downloads) when it
|
||||
// executes, not when it comes from the cache, so the architecture and repository-contract keys
|
||||
// followed whether the same build had executed `test`, and a pull request missed main's entries.
|
||||
// No include reaches those files today; the exclude keeps it that way when an include widens.
|
||||
// These lanes judge files, not directories. The one directory rule, no subdirectory and no unknown
|
||||
// file under docs/registries, keeps its own input (registryCatalog).
|
||||
def repositoryContractExcludes = ['**/build/**', '**/.gradle/**', '**/node_modules/**', '.claude/worktrees/**',
|
||||
'**/__pycache__/**', '**/*.pyc']
|
||||
'**/__pycache__/**', '**/*.pyc', '**/.approval_tests_temp/**']
|
||||
// docs/registries/** are machine contracts, not prose: a malformed registry must fail the pull request
|
||||
// (RegistrySchemaPullRequestGateTest), so the lane reruns when anything there changes. The catalog
|
||||
// rejects any child that is not a regular file and any file it does not know, README.md included, so
|
||||
// this input is the whole directory, directories too, with no exclude of ours. Gradle's default
|
||||
// excludes (.gitignore and the like) still stay out; main's documentContractTest catches one there.
|
||||
def registryCatalogInput = new File(repositoryRootForContractTests, 'docs/registries')
|
||||
def repositoryContractInputs = files(
|
||||
fileTree(repositoryRootForContractTests) {
|
||||
// docs/registries/** are machine contracts, not prose: a malformed registry must fail
|
||||
// the pull request (RegistrySchemaPullRequestGateTest), so the lane reruns when one changes.
|
||||
include '.gitea/**', '.github/**', 'compose/**', 'scripts/**', '*.yml', '*.yaml', 'docs/registries/**', '*.example', '.tool-versions'
|
||||
include '.gitea/**', '.github/**', 'compose/**', 'scripts/**', '*.yml', '*.yaml', '*.example', '.tool-versions'
|
||||
exclude '**/*.md'
|
||||
exclude repositoryContractExcludes
|
||||
},
|
||||
@@ -386,6 +398,7 @@ strictTestLanes {
|
||||
customize { Test task ->
|
||||
task.inputs.files(documentContractInputs)
|
||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
.ignoreEmptyDirectories()
|
||||
.withPropertyName('documentContractInputs')
|
||||
}
|
||||
}
|
||||
@@ -396,7 +409,11 @@ strictTestLanes {
|
||||
customize { Test task ->
|
||||
task.inputs.files(repositoryContractInputs)
|
||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
.ignoreEmptyDirectories()
|
||||
.withPropertyName('repositoryContractInputs')
|
||||
task.inputs.dir(registryCatalogInput)
|
||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
.withPropertyName('registryCatalog')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -416,7 +433,9 @@ tasks.named('architectureTest', Test) {
|
||||
include 'src/**/src/main/java/**/*.java', 'build-logic/src/main/java/**/*.java',
|
||||
'src/bootstrap/app/src/architectureTest/java/**'
|
||||
exclude repositoryContractExcludes
|
||||
}).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName('scannedSources')
|
||||
}).withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
.ignoreEmptyDirectories()
|
||||
.withPropertyName('scannedSources')
|
||||
}
|
||||
tasks.named('conditionalTransportBuildContractTest', Test) {
|
||||
inputs.file('build.gradle').withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName('buildScript')
|
||||
@@ -470,7 +489,9 @@ tasks.named('publicPathSnapshotTest', Test) {
|
||||
inputs.files(fileTree(rootProject.projectDir) {
|
||||
include 'src/**/src/main/java/**/*.java', 'docs/security/public-paths-snapshot.txt'
|
||||
exclude repositoryContractExcludes
|
||||
}).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName('securitySourcesAndBaseline')
|
||||
}).withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
.ignoreEmptyDirectories()
|
||||
.withPropertyName('securitySourcesAndBaseline')
|
||||
}
|
||||
|
||||
tasks.register('stageDockerJar', Sync) {
|
||||
|
||||
Reference in New Issue
Block a user