build: migrate build infrastructure from Gradle to Maven#1346
Merged
Conversation
Migrates the build system from Gradle to Maven, mirroring the v1 SDK migration (microsoftgraph/msgraph-sdk-java#2613), and moves CI/CD away from PAT-based Azure Artifacts auth to PAT-less MavenAuthenticate. - Add pom.xml, Maven wrapper (mvnw/mvnw.cmd/.mvn) - Replace gradle-build.yml with maven-build.yml; update codeql to mvnw - Update ADO ci-build.yml and daily-ci-build.yml to Maven + MavenAuthenticate@0 - dependabot: root -> maven, /android kept as gradle - release-please: xml xpath updater for pom.xml version - android: inline dependencies; remove shared gradle/dependencies.gradle - Remove all root Gradle files and the java-8 subproject Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Set the executable bit on mvnw so Linux CI (GitHub Actions) can run it (was failing with exit 126 / Permission denied) - Increase maven-javadoc-plugin fork heap to -J-Xmx4g; the beta SDK has 27,817 source files and OOMed javadoc at 2g (Please increase memory) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the repository’s build and CI infrastructure from Gradle to Maven (with Maven Wrapper), updating GitHub Actions and Azure Pipelines accordingly and removing legacy Gradle/Java-8 subproject scaffolding.
Changes:
- Introduces a root
pom.xmlMaven build (compiler settings, dependencies, jar/javadoc/source artifacts, signing profile) plus Maven Wrapper files. - Updates CI pipelines (GitHub Actions + Azure Pipelines) to run
./mvnwand authenticate to Azure Artifacts viaMavenAuthenticate@0(PAT-less). - Removes root Gradle build files and the legacy
java-8/Gradle subproject; inlines Android dependency declarations.
Reviewed changes
Copilot reviewed 22 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle | Removed root Gradle settings (Gradle build no longer used). |
| release-please-config.json | Switches release-please version updating from gradle.properties to pom.xml via XPath. |
| pom.xml | Adds Maven build definition (deps, compiler config, artifacts, signing profile). |
| mvnw.cmd | Adds Maven Wrapper Windows launcher script. |
| mvnw | Adds Maven Wrapper POSIX launcher script. |
| java-8/settings.gradle | Removes Java-8 subproject Gradle settings. |
| java-8/gradle.properties | Removes Java-8 subproject Gradle properties. |
| java-8/daemon-jvm.properties | Removes Java-8 Gradle daemon/toolchain config. |
| java-8/build.gradle | Removes Java-8 subproject Gradle build script. |
| java-8/.gitignore | Removes Java-8 subproject Gradle ignore rules (subproject removed). |
| gradlew.bat | Removes Gradle Wrapper (Windows). |
| gradlew | Removes Gradle Wrapper (POSIX). |
| gradle/wrapper/gradle-wrapper.properties | Removes Gradle wrapper properties. |
| gradle/dependencies.gradle | Removes shared Gradle dependency catalog. |
| gradle.properties | Removes Gradle project properties (versioning and publishing config migrated). |
| build.gradle | Removes root Gradle build script (publishing/signing logic migrated). |
| android/build.gradle | Inlines dependencies previously pulled from gradle/dependencies.gradle. |
| .mvn/wrapper/maven-wrapper.properties | Adds Maven Wrapper distribution and checksum configuration. |
| .gitignore | Updates ignores for Maven outputs and wrapper jar handling. |
| .github/workflows/maven-build.yml | Replaces Gradle CI build with Maven (./mvnw verify + Java 8 compile job). |
| .github/workflows/codeql-analysis.yml | Updates CodeQL build step to Maven compile and Maven caching. |
| .github/dependabot.yml | Switches root updates to Maven; keeps Android as Gradle; preserves GitHub Actions updates. |
| .azure-pipelines/daily-ci-build.yml | Migrates daily Azure Pipeline build from Gradle to Maven + PAT-less feed auth and mirror settings. |
| .azure-pipelines/ci-build.yml | Migrates CI/release pipeline steps to Maven (install/deploy staging) + GPG import and PAT-less feed auth. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jingjingjia-ms
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the build system from Gradle to Maven, mirroring the v1 SDK migration (msgraph-sdk-java#2613), and moves CI/CD away from PAT-based Azure Artifacts auth to PAT-less
MavenAuthenticate.Changes
New Maven build
pom.xmlwith all dependencies, compiler settings (Java 1.8,-parameters), jar manifest (Automatic-Module-Name), javadoc, source, and GPG signing profilemvnw/mvnw.cmd/.mvn) replacing the Gradle wrapperCI/CD (PAT-less)
gradle-build.yml→maven-build.yml(mvnw verify, Java 8 job runsmvnw compile)codeql-analysis.ymlupdated tomvnw compile+ maven cacheci-build.yml: GPG import,~/.m2/settings.xml,MavenAuthenticate@0,mvnw install/deploy -Psigning, pom-based version,target/staging-deploystagingdaily-ci-build.yml:Maven@4+ mirrorsettings.xml+MavenAuthenticate@0, replacing thesedrepo-stripping and$(ARTIFACTS_PAT)PAT flagConfig
dependabot.yml: root →maven,/androidkept asgradle(weekly + github-actions group preserved)release-please-config.json: XML xpath updater forpom.xmlversion.gitignore: Maven entries + wrapper-jar exceptionandroid/build.gradle: dependencies inlined (sharedgradle/dependencies.gradleremoved)Removed
build.gradle,settings.gradle,gradle.properties,gradlew, wrapper)java-8/subproject (Java 8 compat now verified via Mavensource/target 1.8+ JDK 8 CI job)Verification
./mvnw compile— 27,817 source files compiled successfully, BUILD SUCCESS ✅Microsoft Reviewers: Open in CodeFlow