Skip to content

Commit 504e442

Browse files
committed
Merge branch 'feature/6.0' into release/v6
2 parents 6992c55 + 4e353c9 commit 504e442

File tree

40,448 files changed

+3237509
-1672319
lines changed

Some content is hidden

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

40,448 files changed

+3237509
-1672319
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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-beta-sdk-java-mem-latest]
1717
steps:
1818
- uses: actions/checkout@v4
1919
- uses: actions/setup-java@v4

.github/workflows/codeql-analysis.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ on:
2424
jobs:
2525
analyze:
2626
name: Analyze
27-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
28-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
27+
runs-on: macos-latest #[self-hosted, 1ES.Pool=1es-ubuntu-msgraph-beta-sdk-java-mem-latest]
28+
#timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
2929
permissions:
3030
actions: read
3131
contents: read
@@ -56,6 +56,11 @@ jobs:
5656
uses: github/codeql-action/init@v3
5757
with:
5858
languages: ${{ matrix.language }}
59+
threads: 4
60+
#init-heap: 1024M # Initial heap size
61+
#max-heap: 4096M # Maximum heap size
62+
ram: 4096
63+
5964
# If you wish to specify custom queries, you can do so here or in a config file.
6065
# By default, queries listed here will override any specified in a config file.
6166
# Prefix the list here with "+" to use these queries and those in the config file.
@@ -77,10 +82,10 @@ jobs:
7782

7883
- name: Grant execute permission for gradlew
7984
run: chmod +x gradlew
80-
- name: Build with Gradle
81-
run: ./gradlew build
82-
85+
- name: Build #with Gradle
86+
run: gradle clean build "-Dorg.gradle.jvmargs=-Xmx4g -Xms1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
87+
8388
- name: Perform CodeQL Analysis
8489
uses: github/codeql-action/analyze@v3
8590
with:
86-
category: "/language:${{matrix.language}}"
91+
category: "/language:${{matrix.language}}"

.github/workflows/gradle-build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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-beta-sdk-java.jar
62-
PRIOR_PKG_DIFF: ./artifacts/previous/build/libs/msgraph-beta-sdk-java.jar
61+
CURRENT_PKG_DIFF: ./artifacts/current-kiota/build/libs/msgraph-beta-sdk-java.jar
62+
PRIOR_PKG_DIFF: ./artifacts/previous-kiota/build/libs/msgraph-beta-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/action-download-artifact@v3.0.0
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Upload Build Artifact
5050
uses: actions/upload-artifact@v4
5151
with:
52-
name: drop
52+
name: kiota-drop
5353
path: |
5454
**/libs/*
5555
build/generated-pom.xml
@@ -78,7 +78,7 @@ jobs:
7878
with:
7979
tag: ${{ steps.GetVersion.outputs.tag }}
8080
- name: Queue Git Release
81-
uses: benc-uk/workflow-dispatch@v1
81+
uses: benc-uk/workflow-dispatch@v121
8282
with:
8383
workflow: Git Release
8484
token: ${{ secrets.PERSONAL_TOKEN }}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file.
3+
All notable changes to this project will be documented in this file
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

README.md

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Microsoft Graph SDK for Java
2+
## Version 6.0.2 now in Release Candidate stage!
23

34
[![Download](https://img.shields.io/nexus/s/https/oss.sonatype.org/com.microsoft.graph/microsoft-graph-beta.svg)](https://oss.sonatype.org/content/repositories/snapshots/com/microsoft/graph/microsoft-graph-beta/)
45

@@ -15,16 +16,16 @@ Add the repository and a compile dependency for `microsoft-graph-beta` to your p
1516

1617
```Groovy
1718
repositories {
18-
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
19+
mavenCentral()
1920
}
2021
2122
dependencies {
2223
// Include the sdk as a dependency
23-
implementation 'com.microsoft.graph:microsoft-graph-beta:0.78.0-SNAPSHOT'
24+
implementation 'com.microsoft.graph:microsoft-graph-beta:6.1.0'
2425
// Uncomment the line below if you are building an android application
2526
//implementation 'com.google.guava:guava:30.1.1-android'
2627
// This dependency is only needed if you are using the TokenCrendentialAuthProvider
27-
implementation 'com.azure:azure-identity:1.2.5'
28+
implementation 'com.azure:azure-identity:1.11.0'
2829
}
2930
```
3031

@@ -37,13 +38,13 @@ Add the dependency in `dependencies` in pom.xml
3738
<!-- Include the sdk as a dependency -->
3839
<groupId>com.microsoft.graph</groupId>
3940
<artifactId>microsoft-graph-beta</artifactId>
40-
<version>0.78.0-SNAPSHOT</version>
41+
<version>6.1.0</version>
4142
</dependency>
4243
<dependency>
4344
<!-- This dependency is only needed if you are using the TokenCrendentialAuthProvider -->
4445
<groupId>com.azure</groupId>
4546
<artifactId>azure-identity</artifactId>
46-
<version>1.2.5</version>
47+
<version>1.11.0</version>
4748
</dependency>
4849
```
4950

@@ -71,7 +72,7 @@ Register your application by following the steps at [Register your app with the
7172

7273
### 2.2 Create an IAuthenticationProvider object
7374

74-
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.
75+
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.
7576

7677
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).
7778

@@ -80,43 +81,26 @@ For an example of how to get an authentication provider, see [choose a Microsoft
8081
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.
8182

8283
```java
83-
GraphServiceClient<Request> graphClient =
84-
GraphServiceClient
85-
.builder()
86-
.authenticationProvider(authenticationProvider)
87-
.buildClient();
84+
final AzureIdentityAuthenticationProvider authenticationProvider =
85+
new AzureIdentityAuthenticationProvider(credential, null, scopes);
86+
GraphServiceClient graphClient = new GraphServiceClient(authenticationProvider)
87+
88+
//Alternatively
89+
GraphServiceClient graphClient = new GraphServiceClient(credential, scopes);
8890
```
8991

9092
## 3. Make requests against the service
9193

9294
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).
9395

94-
### 3.1 Get the user's drive
95-
96-
To retrieve the user's drive:
97-
98-
```java
99-
final Drive result = graphClient
100-
.me()
101-
.drive()
102-
.buildRequest()
103-
.get();
104-
System.out.println("Found Drive " + result.id);
105-
```
96+
### 3.1 Get the user info
10697

107-
Or with the asynchronous API.
98+
To retrieve the user's information:
10899

109100
```java
110-
graphClient
111-
.me()
112-
.drive()
113-
.buildRequest()
114-
.futureGet()
115-
.thenApply(result -> {
116-
System.out.println("Found Drive " + result.id);
117-
});
101+
User me = graphClient.me().get();
102+
System.out.printf("Hello %s, your ID is %s%n", me.getDisplayName(), me.getId());
118103
```
119-
120104
## 4. Documentation
121105

122106
For more detailed documentation, see:
@@ -147,6 +131,3 @@ Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the [MI
147131
## 9. Third-party notices
148132

149133
[Third-party notices](THIRD%20PARTY%20NOTICES)
150-
151-
152-

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ 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"
10+
classpath "gradle.plugin.com.github.viswaramamoorthy:gradle-util-plugins:0.1.0-RELEASE"
1211
classpath "com.android.tools.build:gradle:8.2.2"
1312
classpath "com.github.ben-manes:gradle-versions-plugin:0.51.0"
1413
}
@@ -21,9 +20,10 @@ 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 {
26-
namespace "com.microsoft.graph"
26+
namespace 'com.microsoft.graph'
2727

2828
compileSdkVersion 34
2929

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=-Xmx4g
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
27-
mavenArtifactId = microsoft-graph
28-
mavenMajorVersion = 2
29-
mavenMinorVersion = 3
30-
mavenPatchVersion = 1
27+
mavenArtifactId = microsoft-graph-beta
28+
mavenMajorVersion = 10
29+
mavenMinorVersion = 0
30+
mavenPatchVersion = 0
3131
mavenArtifactSuffix =
3232

3333
#These values are used to run functional tests

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ sourceSets {
3737
repositories {
3838
// You can declare any Maven/Ivy/file repository here.
3939
mavenCentral()
40+
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
4041
}
4142

4243
apply from: "gradle/dependencies.gradle"
@@ -51,6 +52,8 @@ def pomConfig = {
5152
}
5253
}
5354

55+
tasks.withType(Javadoc).all { enabled = false }
56+
5457
//Publishing tasks-
5558
//Maven Central Snapshot: publishSnapshotPublicationToMavenRepository
5659
//Maven Central Release: publishMavenCentralReleasePublicationToMaven2Repository
@@ -59,6 +62,7 @@ tasks.jar {
5962
manifest {
6063
attributes('Automatic-Module-Name': project.property('mavenGroupId'))
6164
}
65+
zip64(true)
6266
}
6367

6468
publishing {
@@ -150,8 +154,8 @@ def fixAscNames = { name ->
150154

151155
compileJava {
152156
options.compilerArgs << "-parameters"
153-
sourceCompatibility = 1.8
154-
targetCompatibility = 1.8
157+
sourceCompatibility = '1.8'
158+
targetCompatibility = '1.8'
155159
}
156160

157161
def getVersionCode() {

gradle.properties

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
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=-Xmx4g
22+
org.gradle.jvmargs=-Xmx8g -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-beta
28-
mavenMajorVersion = 0
29-
mavenMinorVersion = 78
28+
mavenMajorVersion = 6
29+
mavenMinorVersion = 1
3030
mavenPatchVersion = 0
31-
mavenArtifactSuffix =
31+
mavenArtifactSuffix =
3232

3333
#These values are used to run functional tests
3434
#If you wish to run the functional tests, edit the gradle.properties
@@ -40,27 +40,7 @@ Password="PASSWORD"
4040

4141
#enable mavenCentralPublishingEnabled to publish to maven central
4242
mavenCentralSnapshotArtifactSuffix = -SNAPSHOT
43-
mavenCentralPublishingEnabled=false
44-
45-
46-
47-
48-
49-
50-
51-
52-
53-
54-
55-
56-
57-
58-
59-
60-
61-
62-
63-
43+
mavenCentralPublishingEnabled=true
6444

6545

6646

0 commit comments

Comments
 (0)