Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify testing the distribution (bust up DistributionIntegrationSpec) #29179

Open
lptr opened this issue May 16, 2024 · 0 comments
Open

Simplify testing the distribution (bust up DistributionIntegrationSpec) #29179

lptr opened this issue May 16, 2024 · 0 comments
Labels
a:chore Minor issue without significant impact in:building-gradle gradle/gradle build

Comments

@lptr
Copy link
Member

lptr commented May 16, 2024

DistributionIntegrationSpec keeps our distro size in check.

It observes the overall size of the distro ZIPs (all, bin, src and docs), as wella s the number of "core", "plugin" and "third-party" libraries. Updating these numbers is cumbersome, can easily result in conflicts (even hidden ones), and the test is expensive to execute as it needs the whole distro to be built.

Proposed changes:

  • Drop checking "core" and "plugin" JAR count; we cannot "accidentally" introduce a large amount of code by adding more core or plugin projects.
  • Either drop the "third-party" JAR count check, too, or make it an assertion in build-logic where we can use the Configuration without having to build the actual distribution
  • Maybe move the distro size-check to build-logic, too, though we probably do want to have a hard limit on the resulting ZIP size.
  • Review if we need a list of (some of the) JARs in this test, and if so, make sure that it gets updated.
    // Kotlin DSL
    assertIsGradleJar(contentsDir.file("lib/gradle-kotlin-dsl-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/gradle-kotlin-dsl-extensions-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/gradle-kotlin-dsl-shared-runtime-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/gradle-kotlin-dsl-tooling-models-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-kotlin-dsl-provider-plugins-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-kotlin-dsl-tooling-builders-${baseVersion}.jar"))
    // Plugins
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-dependency-management-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-version-control-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-plugins-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-ide-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-scala-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-code-quality-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-antlr-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-maven-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-signing-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-ear-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-platform-native-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-ide-native-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-language-native-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-platform-jvm-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-language-jvm-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-language-java-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-language-groovy-${baseVersion}.jar"))
    assertIsGradleJar(contentsDir.file("lib/plugins/gradle-enterprise-${baseVersion}.jar"))
    // Agents
    assertIsGradleJar(contentsDir.file("lib/agents/gradle-instrumentation-agent-${baseVersion}.jar"))
    // Docs
    contentsDir.file('README').assertIsFile()
@lptr lptr added the a:chore Minor issue without significant impact label May 16, 2024
@lptr lptr added in:building-gradle gradle/gradle build and removed to-triage labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:chore Minor issue without significant impact in:building-gradle gradle/gradle build
Projects
None yet
Development

No branches or pull requests

1 participant