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

archiveIsReproducibleByDefault() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  15bb109a_e2de_68b9_bb2b_7871ba599e91["archiveIsReproducibleByDefault()"]
  26148072_84a7_a719_f2c9_48891b8396d2["newFiles()"]
  15bb109a_e2de_68b9_bb2b_7871ba599e91 -->|calls| 26148072_84a7_a719_f2c9_48891b8396d2
  6735338a_2770_d6bf_59a2_0a9fa6f0b3fc["executeTask()"]
  15bb109a_e2de_68b9_bb2b_7871ba599e91 -->|calls| 6735338a_2770_d6bf_59a2_0a9fa6f0b3fc
  style 15bb109a_e2de_68b9_bb2b_7871ba599e91 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 355–375

	@Test
	void archiveIsReproducibleByDefault() 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"));
		executeTask();
		assertThat(this.task.getArchiveFile().get().getAsFile()).exists();
		List<String> files = new ArrayList<>();
		try (JarFile jarFile = new JarFile(this.task.getArchiveFile().get().getAsFile())) {
			Enumeration<JarEntry> entries = jarFile.entries();
			while (entries.hasMoreElements()) {
				JarEntry entry = entries.nextElement();
				assertThat(entry.getLastModifiedTime().toMillis())
					.isEqualTo(ZipEntryConstants.CONSTANT_TIME_FOR_ZIP_ENTRIES);
				if (entry.getName().startsWith("files/")) {
					files.add(entry.getName());
				}
			}
		}
		assertThat(files).containsExactly("files/", "files/a/", "files/a/alpha.txt", "files/b/", "files/b/bravo.txt",
				"files/c/", "files/c/charlie.txt");
	}

Domain

Subdomains

Frequently Asked Questions

What does archiveIsReproducibleByDefault() do?
archiveIsReproducibleByDefault() is a function in the spring-boot codebase.
What does archiveIsReproducibleByDefault() call?
archiveIsReproducibleByDefault() 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