Skip to content

Commit 8a92eeb

Browse files
authored
Merge pull request #858 from microsoftgraph/feature/6.0
6.0.1 Release
2 parents 6992c55 + 3e5a247 commit 8a92eeb

File tree

40,897 files changed

+3303470
-1677343
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,897 files changed

+3303470
-1677343
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: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Maven Preview 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'
@@ -13,6 +13,7 @@ on:
1313

1414
env:
1515
PREVIEW_TASK: publishSnapshotPublicationToSonatypeSnapshotRepository
16+
PUBLISH_TASK: publishMavenCentralReleasePublicationToSonatypeRepository
1617

1718
jobs:
1819
maven_Preview:
@@ -62,8 +63,55 @@ jobs:
6263
**/gradle/**
6364
Scripts/**
6465
66+
maven_Release:
67+
if: ${{ github.ref == 'refs/heads/dev' }}
68+
environment:
69+
name: maven_central_release
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- name: Set up JDK
74+
uses: actions/setup-java@v4
75+
with:
76+
java-version: 18
77+
distribution: 'adopt'
78+
cache: gradle
79+
- name: Easy detect-secrets
80+
uses: RobertFischer/detect-secrets-action@v2.0.0
81+
- name: Download File
82+
run: .\Scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
83+
shell: pwsh
84+
env:
85+
ENCODED_VALUE: ${{ secrets.LOCAL_PROPERTIES }}
86+
OUTPUT_PATH: '.\local.properties'
87+
- name: Download File
88+
run: .\Scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
89+
shell: pwsh
90+
env:
91+
ENCODED_VALUE: ${{ secrets.SECRING_GPG }}
92+
OUTPUT_PATH: '.\secring.gpg'
93+
- name: Grant execute permission for gradlew
94+
run: chmod +x gradlew
95+
- name: Publish
96+
run: ./gradlew $PUBLISH_TASK
97+
- name: Upload Build Artifact
98+
uses: actions/upload-artifact@v4
99+
with:
100+
name: drop
101+
path: |
102+
**/libs/*
103+
build/generated-pom.xml
104+
build/generated-pom.xml.asc
105+
build.gradle
106+
gradlew
107+
gradlew.bat
108+
settings.gradle
109+
gradle.properties
110+
**/gradle/**
111+
Scripts/**
112+
65113
create_Tag:
66-
needs: maven_Preview
114+
needs: maven_Release
67115
runs-on: ubuntu-latest
68116
env:
69117
RELEASE_TAG: ""
@@ -78,7 +126,7 @@ jobs:
78126
with:
79127
tag: ${{ steps.GetVersion.outputs.tag }}
80128
- name: Queue Git Release
81-
uses: benc-uk/workflow-dispatch@v1
129+
uses: benc-uk/workflow-dispatch@v121
82130
with:
83131
workflow: Git Release
84132
token: ${{ secrets.PERSONAL_TOKEN }}

CHANGELOG.md

Lines changed: 8 additions & 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).
@@ -11,6 +11,13 @@ 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+
### Added
17+
18+
- Major Version 6.1.0 now Generally Available.
19+
- See [Upgrade Guide](https://github.com/microsoftgraph/msgraph-sdk-java/blob/dev/docs/upgrade-to-v6.md) and README for more information.
20+
1421
## [0.78.0] - 2023-08-10
1522

1623
### Changed

README.md

Lines changed: 17 additions & 46 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!
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,26 +38,16 @@ 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

50-
Add the repository in `repositories` in pom.xml
51-
52-
```xml
53-
<repository>
54-
<id>sonatype-snapshot</id>
55-
<name>Sonatype Snapshot</name>
56-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
57-
</repository>
58-
```
59-
6051
>**Note:** if the `repositories` node doesn't exist, add it in `project`. For more information about the maven repositories configuration, [refer to this documentation](https://maven.apache.org/guides/mini/guide-multiple-repositories.html).
6152
6253
### 1.3 Enable ProGuard (Android)
@@ -71,7 +62,7 @@ Register your application by following the steps at [Register your app with the
7162

7263
### 2.2 Create an IAuthenticationProvider object
7364

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.
65+
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.
7566

7667
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).
7768

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

8273
```java
83-
GraphServiceClient<Request> graphClient =
84-
GraphServiceClient
85-
.builder()
86-
.authenticationProvider(authenticationProvider)
87-
.buildClient();
74+
final AzureIdentityAuthenticationProvider authenticationProvider =
75+
new AzureIdentityAuthenticationProvider(credential, null, scopes);
76+
GraphServiceClient graphClient = new GraphServiceClient(authenticationProvider)
77+
78+
//Alternatively
79+
GraphServiceClient graphClient = new GraphServiceClient(credential, scopes);
8880
```
8981

9082
## 3. Make requests against the service
9183

9284
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).
9385

94-
### 3.1 Get the user's drive
86+
### 3.1 Get the user info
9587

96-
To retrieve the user's drive:
88+
To retrieve the user's information:
9789

9890
```java
99-
final Drive result = graphClient
100-
.me()
101-
.drive()
102-
.buildRequest()
103-
.get();
104-
System.out.println("Found Drive " + result.id);
91+
User me = graphClient.me().get();
92+
System.out.printf("Hello %s, your ID is %s%n", me.getDisplayName(), me.getId());
10593
```
106-
107-
Or with the asynchronous API.
108-
109-
```java
110-
graphClient
111-
.me()
112-
.drive()
113-
.buildRequest()
114-
.futureGet()
115-
.thenApply(result -> {
116-
System.out.println("Found Drive " + result.id);
117-
});
118-
```
119-
12094
## 4. Documentation
12195

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

149123
[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: 6 additions & 6 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 = 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)