Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
23a4cce
chore(deps): bump rickstaa/action-create-tag from 1.6.4 to 1.6.6
dependabot[bot] Nov 2, 2023
797d40d
Merge pull request #1253 from microsoftgraph/dependabot/github_action…
andrueastman Nov 2, 2023
45df741
chore(deps): bump com.azure:azure-core from 1.44.1 to 1.45.0
dependabot[bot] Nov 6, 2023
d288ac8
Merge pull request #1264 from microsoftgraph/dependabot/maven/com.azu…
baywet Nov 6, 2023
99a6c91
chore(deps): bump org.junit.jupiter:junit-jupiter-params in /android
dependabot[bot] Nov 6, 2023
fa93ebb
chore(deps): bump org.junit.jupiter:junit-jupiter-params
dependabot[bot] Nov 6, 2023
01b0b67
Merge pull request #1270 from microsoftgraph/dependabot/gradle/androi…
andrueastman Nov 6, 2023
78343be
chore(deps): bump com.azure:azure-core from 1.44.1 to 1.45.0
dependabot[bot] Nov 6, 2023
c00bcc0
chore(deps): bump com.azure:azure-core from 1.44.1 to 1.45.0 in /android
dependabot[bot] Nov 6, 2023
ac9b02c
Merge pull request #1285 from microsoftgraph/dependabot/gradle/org.ju…
andrueastman Nov 6, 2023
a550a1d
Merge pull request #1282 from microsoftgraph/dependabot/gradle/com.az…
andrueastman Nov 6, 2023
b6a128d
chore(deps-dev): bump org.junit.jupiter:junit-jupiter-params
dependabot[bot] Nov 6, 2023
770e189
Merge pull request #1271 from microsoftgraph/dependabot/gradle/androi…
andrueastman Nov 6, 2023
bbe99fa
Merge pull request #1266 from microsoftgraph/dependabot/maven/org.jun…
andrueastman Nov 6, 2023
250e722
chore(deps-dev): bump org.junit.jupiter:junit-jupiter-api
dependabot[bot] Nov 6, 2023
f8ca88a
Merge pull request #1265 from microsoftgraph/dependabot/maven/org.jun…
andrueastman Nov 6, 2023
1e7393d
chore(deps): bump org.junit.jupiter:junit-jupiter-api in /android
dependabot[bot] Nov 6, 2023
65fbb98
Merge pull request #1273 from microsoftgraph/dependabot/gradle/androi…
andrueastman Nov 6, 2023
ee6e24b
chore(deps): bump org.junit.jupiter:junit-jupiter-engine
dependabot[bot] Nov 6, 2023
3cf65e7
Merge pull request #1284 from microsoftgraph/dependabot/gradle/org.ju…
andrueastman Nov 6, 2023
3f44241
chore(deps): bump com.github.spotbugs
dependabot[bot] Nov 7, 2023
97c4b62
Merge pull request #1287 from microsoftgraph/dependabot/gradle/sample…
andrueastman Nov 7, 2023
8d53414
chore(deps): bump com.github.spotbugs:spotbugs-annotations
dependabot[bot] Nov 7, 2023
0f22e2f
Merge pull request #1288 from microsoftgraph/dependabot/gradle/com.gi…
andrueastman Nov 7, 2023
cc4368a
chore(deps): bump com.github.spotbugs:spotbugs-annotations
dependabot[bot] Nov 7, 2023
66f03c6
Merge pull request #1289 from microsoftgraph/dependabot/maven/com.git…
andrueastman Nov 7, 2023
4b65608
chore(deps): bump com.android.tools.build:gradle in /android
dependabot[bot] Nov 8, 2023
095cfa5
Merge pull request #1295 from microsoftgraph/dependabot/gradle/androi…
andrueastman Nov 8, 2023
42f6353
chore(deps): bump com.azure:azure-identity in /samples/deviceCodeSample
dependabot[bot] Nov 8, 2023
74f3841
Merge pull request #1294 from microsoftgraph/dependabot/gradle/sample…
andrueastman Nov 8, 2023
17f5ceb
chore(deps): bump com.azure:azure-identity
dependabot[bot] Nov 8, 2023
87f33b9
Merge pull request #1292 from microsoftgraph/dependabot/gradle/sample…
baywet Nov 8, 2023
6ede082
Use parent Call.Factory of OkHttpClient to be able to use OpenTelemetry
cbos Oct 25, 2023
8221a4a
Remove usage of generics
cbos Oct 25, 2023
7da6603
Update changelog and add info how to use OpenTelemetry with GraphServ…
cbos Oct 25, 2023
69294af
- bumps patch version
baywet Nov 8, 2023
1dfcdb3
- adds a check secret step for the sonarcloud workflow to avoid failu…
baywet Nov 8, 2023
43eba0b
Merge pull request #1252 from cbos/prepare_for_opentelemetry
baywet Nov 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
run: .\scripts\getLatestVersion.ps1
shell: pwsh
- name: Create tag
uses: rickstaa/action-create-tag@v1.6.4
uses: rickstaa/action-create-tag@v1.6.6
with:
tag: ${{ steps.GetVersion.outputs.tag }}
- name: Queue Git Release
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,24 @@ on:
- feature/v2
pull_request:
types: [opened, synchronize, reopened]

env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

jobs:
checksecret:
name: check if SONAR_TOKEN is set in github secrets
runs-on: ubuntu-latest
outputs:
is_SONAR_TOKEN_set: ${{ steps.checksecret_job.outputs.is_SONAR_TOKEN_set }}
steps:
- name: Check whether unity activation requests should be done
id: checksecret_job
run: |
echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT
build:
needs: [checksecret]
if: needs.checksecret.outputs.is_SONAR_TOKEN_set == 'true'
name: Build
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -37,5 +53,4 @@ jobs:
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonarqube --info
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

### Changed

## [2.0.21] - 2023-11-08

### Changed

- Changed CoreHttpProvider dependency from OkHttpClient to Call.Factory (parent interface implemented by OkHttpClient). This make usage of OpenTelemetry tracing possible.
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/okhttp/okhttp-3.0/library/README.md

```java
private Call.Factory createTracedClient(OpenTelemetry openTelemetry, @Nonnull final IAuthenticationProvider auth) {
return OkHttpTelemetry.builder(openTelemetry).build().newCallFactory(createClient(auth));
}

private OkHttpClient createClient(@Nonnull final IAuthenticationProvider auth) {
return HttpClients.createDefault(auth);
}

// then create the GraphServiceClient
IAuthenticationProvider authenticationProvider = ...;
GraphServiceClient
.builder(Call.Factory.class, Request.class)
.httpClient(createTracedClient(openTelemetry, authenticationProvider))
.authenticationProvider(authenticationProvider)
.buildClient();
```

## [2.0.20] - 2023-10-23

### Changed
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {

dependencies {
classpath "com.gradle:gradle-enterprise-gradle-plugin:3.15.1"
classpath "com.android.tools.build:gradle:8.1.2"
classpath "com.android.tools.build:gradle:8.1.3"
classpath "com.github.ben-manes:gradle-versions-plugin:0.49.0"
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.github.spotbugs' version '5.2.1'
id 'com.github.spotbugs' version '5.2.3'
id "org.sonarqube" version "4.4.1.3373"
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mavenGroupId = com.microsoft.graph
mavenArtifactId = microsoft-graph-core
mavenMajorVersion = 2
mavenMinorVersion = 0
mavenPatchVersion = 20
mavenPatchVersion = 21
mavenArtifactSuffix =

#These values are used to run functional tests
Expand Down
10 changes: 5 additions & 5 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
dependencies {
// Use JUnit test framework
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.1'
testImplementation 'org.mockito:mockito-inline:5.2.0'

api 'com.squareup.okhttp3:okhttp:4.12.0'

implementation 'com.google.guava:guava:32.1.3-jre'

implementation 'com.google.code.gson:gson:2.10.1'
api 'com.azure:azure-core:1.44.1'
api 'com.azure:azure-core:1.45.0'

api 'com.github.spotbugs:spotbugs-annotations:4.8.0'
api 'com.github.spotbugs:spotbugs-annotations:4.8.1'
}
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.44.1</version>
<version>1.45.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.0</version>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.10.0</version>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -58,7 +58,7 @@
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>4.8.0</version>
<version>4.8.1</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion samples/deviceCodeSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ repositories {
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
implementation project(':coreLibrary')
implementation 'com.azure:azure-identity:1.10.4'
implementation 'com.azure:azure-identity:1.11.0'
}
2 changes: 1 addition & 1 deletion samples/interactiveBrowserSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ repositories {
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
implementation project(':coreLibrary')
implementation 'com.azure:azure-identity:1.10.4'
implementation 'com.azure:azure-identity:1.11.0'
}
3 changes: 2 additions & 1 deletion src/main/java/com/microsoft/graph/core/BaseClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import javax.annotation.Nonnull;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import okhttp3.Call;
import okhttp3.OkHttpClient;
import okhttp3.Request;

Expand Down Expand Up @@ -185,7 +186,7 @@ private httpClientType getHttpClient() {
@SuppressWarnings("unchecked")
private IHttpProvider<nativeRequestType> getHttpProvider() {
if(httpProvider == null) {
return (IHttpProvider<nativeRequestType>)new CoreHttpProvider(getSerializer(), getLogger(), (OkHttpClient)getHttpClient());
return (IHttpProvider<nativeRequestType>)new CoreHttpProvider(getSerializer(), getLogger(), (Call.Factory) getHttpClient());
} else {
return httpProvider;
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/microsoft/graph/http/CoreHttpProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public class CoreHttpProvider implements IHttpProvider<Request> {
private final ILogger logger;

/**
* The OkHttpClient that handles all requests
* The OkHttpClient(Call.Factory) that handles all requests
*/
private OkHttpClient corehttpClient;
private Call.Factory corehttpClient;

/**
* Creates the CoreHttpProvider
Expand All @@ -112,7 +112,7 @@ public class CoreHttpProvider implements IHttpProvider<Request> {
@SuppressFBWarnings
public CoreHttpProvider(@Nonnull final ISerializer serializer,
@Nonnull final ILogger logger,
@Nonnull final OkHttpClient httpClient) {
@Nonnull final Call.Factory httpClient) {
Objects.requireNonNull(logger, "parameter logger cannot be null");
Objects.requireNonNull(serializer, "parameter serializer cannot be null");
Objects.requireNonNull(httpClient, "parameter httpClient cannot be null");
Expand Down