Home / Function/ archiveReproducibilityCanBeDisabled() — spring-boot Function Reference

archiveReproducibilityCanBeDisabled() — spring-boot Function Reference

Architecture documentation for the archiveReproducibilityCanBeDisabled() function in AbstractBootArchiveTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  d2529920_2a51_933c_881a_86e6d953e2ed["archiveReproducibilityCanBeDisabled()"]
  26148072_84a7_a719_f2c9_48891b8396d2["newFiles()"]
  d2529920_2a51_933c_881a_86e6d953e2ed -->|calls| 26148072_84a7_a719_f2c9_48891b8396d2
  6735338a_2770_d6bf_59a2_0a9fa6f0b3fc["executeTask()"]
  d2529920_2a51_933c_881a_86e6d953e2ed -->|calls| 6735338a_2770_d6bf_59a2_0a9fa6f0b3fc
  style d2529920_2a51_933c_881a_86e6d953e2ed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java lines 377–396

	@Test
	void archiveReproducibilityCanBeDisabled() throws IOException {
		this.task.getMainClass().set("com.example.Main");
		this.task.from(newFiles("files/b/bravo.txt", "files/a/alpha.txt", "files/c/charlie.txt"));
		this.task.setPreserveFileTimestamps(true);
		this.task.setReproducibleFileOrder(false);
		executeTask();
		assertThat(this.task.getArchiveFile().get().getAsFile()).exists();
		try (JarFile jarFile = new JarFile(this.task.getArchiveFile().get().getAsFile())) {
			Enumeration<JarEntry> entries = jarFile.entries();
			while (entries.hasMoreElements()) {
				JarEntry entry = entries.nextElement();
				if (entry.getName().endsWith(".txt") || entry.getName().startsWith("BOOT-INF/lib/")) {
					OffsetDateTime lastModifiedTime = entry.getLastModifiedTime().toInstant().atOffset(ZoneOffset.UTC);
					assertThat(lastModifiedTime)
						.isNotEqualTo(OffsetDateTime.of(1980, 2, 1, 0, 0, 0, 0, ZoneOffset.UTC));
				}
			}
		}
	}

Domain

Subdomains

Frequently Asked Questions

What does archiveReproducibilityCanBeDisabled() do?
archiveReproducibilityCanBeDisabled() is a function in the spring-boot codebase.
What does archiveReproducibilityCanBeDisabled() call?
archiveReproducibilityCanBeDisabled() calls 2 function(s): executeTask, newFiles.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free