Skip to content

Commit 89d1a9e

Browse files
Migrate build infrastructure from Gradle to Maven
- Add pom.xml with all dependencies, compiler settings (Java 1.8, -parameters), jar manifest (Automatic-Module-Name), javadoc, source, and GPG signing profile - Add Maven wrapper (mvnw/mvnw.cmd) replacing Gradle wrapper - Rename gradle-build.yml to maven-build.yml with Maven commands and cache - Update codeql-analysis.yml to use mvnw compile - Update ADO ci-build.yml with Maven install/deploy and settings.xml auth - Update ADO daily-ci-build.yml with Maven@4 task and network-isolated mirror - Update dependabot.yml: maven ecosystem for root, gradle kept for /android - Update .gitignore: swap Gradle entries for Maven - Update release-please-config.json: XML xpath updater for pom.xml version - Inline dependencies into android/build.gradle (remove shared gradle/dependencies.gradle) - Remove all root Gradle files and java-8/ sub-project Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ea0951f commit 89d1a9e

19 files changed

Lines changed: 780 additions & 799 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Gradle Build and Compare Package
1+
name: Maven Build
22

33
on:
44
push:
@@ -17,36 +17,29 @@ jobs:
1717
with:
1818
java-version: 21
1919
distribution: 'temurin'
20-
cache: gradle
20+
cache: maven
2121
- name: Move generated sources to correct package
2222
run: .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\generated'
2323
shell: pwsh
24-
- name: Grant Execute permission for gradlew
25-
run: chmod +x gradlew
26-
- name: Build with Gradle
27-
run: ./gradlew build
24+
- name: Build with Maven
25+
run: ./mvnw verify --no-transfer-progress
2826
- name: Upload Unit Test Results
2927
if: ${{ always() }}
3028
uses: actions/upload-artifact@v7
3129
with:
3230
name: UnitTests
3331
path: |
34-
build/reports/tests/test/**
35-
build/test-results/**
32+
target/surefire-reports/**
3633
- name: Upload a Build Artifact
3734
uses: actions/upload-artifact@v7
3835
with:
3936
name: drop
4037
path: |
41-
**/libs/*
42-
build/generated-pom.xml
43-
build/generated-pom.xml.asc
44-
build.gradle
45-
gradlew
46-
gradlew.bat
47-
settings.gradle
48-
gradle.properties
49-
**/gradle/**
38+
target/*.jar
39+
pom.xml
40+
mvnw
41+
mvnw.cmd
42+
.mvn/**
5043
scripts/**
5144
5245
build-java-8:
@@ -58,15 +51,12 @@ jobs:
5851
with:
5952
java-version: 8
6053
distribution: 'temurin'
61-
cache: gradle
54+
cache: maven
6255
- name: Move generated sources to correct package
6356
run: .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\generated'
6457
shell: pwsh
65-
- name: Grant Execute permission for gradlew
66-
run: chmod +x gradlew
6758
- name: Build with Java 8
68-
working-directory: ./java-8
69-
run: .././gradlew build
59+
run: ./mvnw compile --no-transfer-progress
7060

7161
build:
7262
needs: [build-java-latest, build-java-8]
@@ -81,19 +71,3 @@ jobs:
8171
exit 1
8272
fi
8373
84-
dependency-submission:
85-
runs-on: ubuntu-latest
86-
if: github.event_name == 'push'
87-
permissions:
88-
contents: write
89-
steps:
90-
- uses: actions/checkout@v6
91-
- name: Set up JDK
92-
uses: actions/setup-java@v5
93-
with:
94-
java-version: 21
95-
distribution: 'temurin'
96-
cache: gradle
97-
- name: Generate and submit dependency graph
98-
uses: gradle/actions/dependency-submission@v6
99-

.mvn/wrapper/maven-wrapper.jar

61.6 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar

build.gradle

Lines changed: 0 additions & 197 deletions
This file was deleted.

0 commit comments

Comments
 (0)