# Maven vs Gradle: source lines of code compared

The Maven vs Gradle comparison on OctoCounts shows side-by-side source line counts for apache/maven and gradle/gradle, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-15, apache/maven contains 260,760 total lines (152,681 code) across 1,914 files, while gradle/gradle contains 1,798,190 total lines (1,187,703 code) across 15,333 files as of 2026-09-16. gradle/gradle is about 7.8x the size of apache/maven by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [apache/maven](https://octocounts.com/github/apache/maven) | [gradle/gradle](https://octocounts.com/github/gradle/gradle) |
| --- | ---: | ---: |
| Files | 1,914 | 15,333 |
| Total lines | 260,760 | 1,798,190 |
| Code lines | 152,681 | 1,187,703 |
| Comment lines | 77,047 | 384,675 |
| Blank lines | 31,032 | 225,812 |
| Languages counted | 9 | 12 |

Top languages in apache/maven: Java (89.3% of code), XML (6.8% of code), Apache Velocity (3.2% of code). Top languages in gradle/gradle: Groovy (45.6% of code), Java (43.5% of code), Kotlin (8.9% of code). Java, XML appear in both top language lists; Apache Velocity, Batch, Shell appear only in apache/maven's top languages; Groovy, Kotlin, C Header appear only in gradle/gradle's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. apache/maven was counted at ref 0aaa578f13a3fb87bd54c2aa9f7652271c83a8b8 (commit 0aaa578f13a3) on 2026-09-15; gradle/gradle was counted at ref 45f98545be7d8c57a6070969df5eb80bea3b0834 (commit 45f98545be7d) on 2026-09-16. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

apache/maven counts the Maven core repository — the build tool itself, written in Java; the plugin ecosystem largely lives in separate plugin repositories under the Apache Maven organization. gradle/gradle counts the Gradle repository: the build system core together with a large set of built-in plugins and language support in one tree. The two counts therefore include different amounts of each project's total surface, and both were taken on the dates shown above.

The per-language tables reflect each codebase's age and design: Maven core is overwhelmingly Java, while Gradle's tree mixes Java, Groovy, and Kotlin DSL code — the difference is visible as a language split rather than a single-language count.

A structural asymmetry shapes the totals: functionality Maven keeps in separate plugin repositories is, for Gradle, committed inside the main repository, so part of the gap between counts is repository organization, not code volume alone.

_Do not read these totals as a build-speed or flexibility comparison: the counts are shaped by what each project chooses to keep in one repository, and neither number measures how fast either tool builds your project._

Sources: [apache/maven repository (build tool core)](https://github.com/apache/maven) · [gradle/gradle repository (core with built-in plugins)](https://github.com/gradle/gradle). Statements verified 2026-09-16.

Evidence and next steps:

- [apache/maven SLOC report](https://octocounts.com/github/apache/maven)
- [gradle/gradle SLOC report](https://octocounts.com/github/gradle/gradle)
- [Compare apache/maven and gradle/gradle interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fapache%2Fmaven&right=https%3A%2F%2Fgithub.com%2Fgradle%2Fgradle)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, apache/maven or gradle/gradle?

gradle/gradle has more code: 1,187,703 code lines versus 152,681 for apache/maven, about 7.8x as much, based on cached OctoCounts reports as of 2026-09-16.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for apache/maven, gradle/gradle, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. apache/maven was counted at ref 0aaa578f13a3fb87bd54c2aa9f7652271c83a8b8 (commit 0aaa578f13a3) on 2026-09-15; gradle/gradle was counted at ref 45f98545be7d8c57a6070969df5eb80bea3b0834 (commit 45f98545be7d) on 2026-09-16. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
