Skip to content

Commit 8a4f789

Browse files
Merge pull request #1783 from microsoftgraph/feature/6.0
6.1.0 Release
2 parents f19ac2d + be93e35 commit 8a4f789

File tree

22,204 files changed

+1807536
-896038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

22,204 files changed

+1807536
-896038
lines changed

.github/workflows/api-level-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Checks the SDK only using APIs from the targeted API level"
22

3-
on:
3+
on:
44
workflow_dispatch:
55
push:
66
branches:
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
lint-api-level:
16-
runs-on: ubuntu-latest
16+
runs-on: [self-hosted, 1ES.Pool=1es-ubuntu-msgraph-sdk-java-memory-latest]
1717
steps:
1818
- uses: actions/checkout@v4
1919
- uses: actions/setup-java@v4
@@ -34,4 +34,4 @@ jobs:
3434
uses: actions/upload-artifact@v4
3535
with:
3636
name: lint-report
37-
path: ./android/build/reports
37+
path: ./android/build/reports

.github/workflows/git-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
- name: Github Release
2424
uses: anton-yurchenko/[email protected]
2525
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
DRAFT_RELEASE: "false"
2828
PRE_RELEASE: "false"
2929
CHANGELOG_FILE: "CHANGELOG.md"
3030
ALLOW_EMPTY_CHANGELOG: "true"
3131
with:
3232
args: |
33-
drop/build/**/*.jar
33+
drop/build/**/*.jar

.github/workflows/gradle-build.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI with Gradle
1+
name: Gradle Build and Compare Package
22

33
on:
44
push:
@@ -24,9 +24,9 @@ jobs:
2424
java-version: 18
2525
distribution: 'adopt'
2626
cache: gradle
27-
- name: Easy detect-secrets
27+
- name: Detect Secrets
2828
uses: RobertFischer/[email protected]
29-
- name: Grant execute permission for gradlew
29+
- name: Grant Execute permission for gradlew
3030
run: chmod +x gradlew
3131
- name: Build with Gradle
3232
run: ./gradlew build
@@ -41,7 +41,7 @@ jobs:
4141
- name: Upload a Build Artifact
4242
uses: actions/upload-artifact@v4
4343
with:
44-
name: drop
44+
name: kiota-drop
4545
path: |
4646
**/libs/*
4747
build/generated-pom.xml
@@ -58,8 +58,8 @@ jobs:
5858
needs: build
5959
runs-on: ubuntu-latest
6060
env:
61-
CURRENT_PKG_DIFF: ./artifacts/current/build/libs/msgraph-sdk-java.jar
62-
PRIOR_PKG_DIFF: ./artifacts/previous/build/libs/msgraph-sdk-java.jar
61+
CURRENT_PKG_DIFF: ./artifacts/current-kiota/build/libs/msgraph-sdk-java.jar
62+
PRIOR_PKG_DIFF: ./artifacts/previous-kiota/build/libs/msgraph-sdk-java.jar
6363
steps:
6464
- uses: actions/checkout@v4
6565
- name: Set up JDK
@@ -71,17 +71,17 @@ jobs:
7171
- name: Download Current Build
7272
uses: actions/download-artifact@v4
7373
with:
74-
name: drop
75-
path: artifacts/current/
74+
name: kiota-drop
75+
path: artifacts/current-kiota/
7676
- name: Download Last Successful Build
7777
uses: dawidd6/[email protected]
7878
with:
7979
workflow: preview-and-release.yml
8080
workflow_conclusion: success
81-
branch: dev
81+
branch: feature/6.0
8282
event: push
83-
name: drop
84-
path: artifacts/previous/
83+
name: kiota-drop
84+
path: artifacts/previous-kiota/
8585
- name: Run PKG Diff
8686
continue-on-error: true
8787
run: |

.github/workflows/preview-and-release.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Maven Preview/Release and Github Release
22

33
on:
44
push:
5-
branches: [ dev, feature/6.0 ]
5+
branches: [ "dev", "feature/6.0" ]
66
paths-ignore:
77
- '.gradle/wrapper'
88
- '.gitignore'
@@ -47,6 +47,21 @@ jobs:
4747
run: chmod +x gradlew
4848
- name: Publish
4949
run: ./gradlew $PREVIEW_TASK
50+
- name: Upload Build Artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: drop
54+
path: |
55+
**/libs/*
56+
build/generated-pom.xml
57+
build/generated-pom.xml.asc
58+
build.gradle
59+
gradlew
60+
gradlew.bat
61+
settings.gradle
62+
gradle.properties
63+
**/gradle/**
64+
Scripts/**
5065
5166
maven_Release:
5267
if: ${{ github.ref == 'refs/heads/dev' }}
@@ -111,7 +126,7 @@ jobs:
111126
with:
112127
tag: ${{ steps.GetVersion.outputs.tag }}
113128
- name: Queue Git Release
114-
uses: benc-uk/workflow-dispatch@v1
129+
uses: benc-uk/workflow-dispatch@v121
115130
with:
116131
workflow: Git Release
117132
token: ${{ secrets.PERSONAL_TOKEN }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
## [6.1.0] - 2024-02-07
15+
16+
- Major Version 6.1.0 now Generally Available.
17+
- See [Upgrade Guide](https://github.com/microsoftgraph/msgraph-sdk-java/blob/dev/docs/upgrade-to-v6.md) for more information.
18+
1419
## [5.80.0] - 2024-01-23
1520

1621
### Added

README.md

Lines changed: 18 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Microsoft Graph SDK for Java
2+
## Version 6.1.0 now Generally Available (GA)!
23

34
[![Download](https://img.shields.io/maven-central/v/com.microsoft.graph/microsoft-graph.svg)](https://search.maven.org/artifact/com.microsoft.graph/microsoft-graph)
45

@@ -19,11 +20,11 @@ repositories {
1920
2021
dependencies {
2122
// Include the sdk as a dependency
22-
implementation 'com.microsoft.graph:microsoft-graph:5.80.0'
23+
implementation 'com.microsoft.graph:microsoft-graph:6.1.0'
2324
// Uncomment the line below if you are building an android application
2425
//implementation 'com.google.guava:guava:30.1.1-android'
25-
// This dependency is only needed if you are using the TokenCrendentialAuthProvider
26-
implementation 'com.azure:azure-identity:1.2.5'
26+
// This dependency is only needed if you are using a TokenCredential object for authentication
27+
implementation 'com.azure:azure-identity:1.11.0'
2728
}
2829
```
2930

@@ -36,13 +37,13 @@ Add the dependency in `dependencies` in pom.xml
3637
<!-- Include the sdk as a dependency -->
3738
<groupId>com.microsoft.graph</groupId>
3839
<artifactId>microsoft-graph</artifactId>
39-
<version>5.80.0</version>
40+
<version>6.1.0</version>
4041
</dependency>
4142
<dependency>
42-
<!-- This dependency is only needed if you are using the TokenCredentialAuthProvider -->
43+
<!-- This dependency is only needed if you are using a TokenCredential object for authentication -->
4344
<groupId>com.azure</groupId>
4445
<artifactId>azure-identity</artifactId>
45-
<version>1.2.5</version>
46+
<version>1.11.0</version>
4647
</dependency>
4748
```
4849

@@ -58,7 +59,7 @@ Register your application by following the steps at [Register your app with the
5859

5960
### 2.2 Create an IAuthenticationProvider object
6061

61-
An instance of the **GraphServiceClient** class handles building requests, sending them to the Microsoft Graph API, and processing the responses. To create a new instance of this class, you need to provide an instance of `IAuthenticationProvider`, which can authenticate requests to Microsoft Graph.
62+
An instance of the **GraphServiceClient** class handles building requests, sending them to the Microsoft Graph API, and processing the responses. To create a new instance of this class, you need to provide an instance of `AuthenticationProvider`, which can authenticate requests to Microsoft Graph.
6263

6364
For an example of how to get an authentication provider, see [choose a Microsoft Graph authentication provider](https://docs.microsoft.com/graph/sdks/choose-authentication-providers?tabs=Java).
6465

@@ -67,43 +68,26 @@ For an example of how to get an authentication provider, see [choose a Microsoft
6768
After you have set the correct application ID and URL, you must get a **GraphServiceClient** object to make requests against the service. The SDK stores the account information for you, but when a user signs in for the first time, it invokes the UI to get the user's account information.
6869

6970
```java
70-
GraphServiceClient<Request> graphClient =
71-
GraphServiceClient
72-
.builder()
73-
.authenticationProvider(authenticationProvider)
74-
.buildClient();
71+
final AzureIdentityAuthenticationProvider authenticationProvider =
72+
new AzureIdentityAuthenticationProvider(credential, null, scopes);
73+
GraphServiceClient graphClient = new GraphServiceClient(authenticationProvider)
74+
75+
//Alternatively
76+
GraphServiceClient graphClient = new GraphServiceClient(credential, scopes);
7577
```
7678

7779
## 3. Make requests against the service
7880

7981
After you have a GraphServiceClient that is authenticated, you can begin making calls against the service. The requests against the service look like our [REST API](https://developer.microsoft.com/en-us/graph/docs/concepts/overview).
8082

81-
### 3.1 Get the user's drive
82-
83-
To retrieve the user's drive:
84-
85-
```java
86-
final Drive result = graphClient
87-
.me()
88-
.drive()
89-
.buildRequest()
90-
.get();
91-
System.out.println("Found Drive " + result.id);
92-
```
83+
### 3.1 Get the user info
9384

94-
Or with the asynchronous API.
85+
To retrieve the user's information:
9586

9687
```java
97-
graphClient
98-
.me()
99-
.drive()
100-
.buildRequest()
101-
.futureGet()
102-
.thenApply(result -> {
103-
System.out.println("Found Drive " + result.id);
104-
});
88+
User me = graphClient.me().get();
89+
System.out.printf("Hello %s, your ID is %s%n", me.getDisplayName(), me.getId());
10590
```
106-
10791
## 4. Documentation
10892

10993
For more detailed documentation, see:
@@ -134,82 +118,3 @@ Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the [MI
134118
## 9. Third-party notices
135119

136120
[Third-party notices](THIRD%20PARTY%20NOTICES)
137-
138-
139-
140-
141-
142-
143-
144-
145-
146-
147-
148-
149-
150-
151-
152-
153-
154-
155-
156-
157-
158-
159-
160-
161-
162-
163-
164-
165-
166-
167-
168-
169-
170-
171-
172-
173-
174-
175-
176-
177-
178-
179-
180-
181-
182-
183-
184-
185-
186-
187-
188-
189-
190-
191-
192-
193-
194-
195-
196-
197-
198-
199-
200-
201-
202-
203-
204-
205-
206-
207-
208-
209-
210-
211-
212-
213-
214-
215-

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ buildscript {
22
repositories {
33
google()
44
gradlePluginPortal()
5-
maven {
6-
url "https://plugins.gradle.org/m2/"
7-
}
5+
maven { url 'https://plugins.gradle.org/m2/' }
86
}
97

108
dependencies {
119
classpath "com.gradle:gradle-enterprise-gradle-plugin:3.16.2"
12-
classpath "com.android.tools.build:gradle:8.2.2"
10+
classpath "gradle.plugin.com.github.viswaramamoorthy:gradle-util-plugins:0.1.0-RELEASE"
1311
classpath "com.github.ben-manes:gradle-versions-plugin:0.51.0"
12+
classpath "com.android.tools.build:gradle:8.2.2"
1413
}
1514
}
1615

@@ -21,6 +20,7 @@ repositories {
2120

2221
apply plugin: "com.android.library"
2322
apply plugin: "com.github.ben-manes.versions"
23+
apply plugin: "com.github.ManifestClasspath"
2424

2525
android {
2626
namespace 'com.microsoft.graph'

android/gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919

2020
# The size of the library demands a large amount of RAM to build. Increase as necessary if you get GC errors
2121
## linux requires 10G, OSX requires 11G
22-
org.gradle.jvmargs=-Xmx2g
22+
org.gradle.jvmargs=-Xmx16g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
2323
org.gradle.parallel=true
2424
org.gradle.caching=true
2525

2626
mavenGroupId = com.microsoft.graph
2727
mavenArtifactId = microsoft-graph
28-
mavenMajorVersion = 2
29-
mavenMinorVersion = 3
30-
mavenPatchVersion = 1
28+
mavenMajorVersion = 6
29+
mavenMinorVersion = 1
30+
mavenPatchVersion = 0
3131
mavenArtifactSuffix =
3232

3333
#These values are used to run functional tests
@@ -40,4 +40,4 @@ Password="PASSWORD"
4040

4141
#enable mavenCentralPublishingEnabled to publish to maven central
4242
mavenCentralSnapshotArtifactSuffix = -SNAPSHOT
43-
mavenCentralPublishingEnabled=false
43+
mavenCentralPublishingEnabled=true

0 commit comments

Comments
 (0)