diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 75c8395a5..865793c50 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,11 @@ updates: schedule: interval: daily open-pull-requests-limit: 10 +- package-ecosystem: maven + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 - package-ecosystem: github-actions directory: "/" schedule: diff --git a/build.gradle b/build.gradle index ac238a4c5..7d4be0145 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ plugins { id 'maven-publish' id 'signing' id 'jacoco' - id 'com.github.spotbugs' version '4.7.0' + id 'com.github.spotbugs' version '4.7.1' } java { @@ -30,7 +30,7 @@ jacocoTestReport { } jacoco { - toolVersion = "0.8.7-SNAPSHOT" //https://github.com/gradle/gradle/issues/15038 + toolVersion = "0.8.7" } spotbugsMain { diff --git a/devx.yml b/devx.yml new file mode 100644 index 000000000..f52c6708d --- /dev/null +++ b/devx.yml @@ -0,0 +1,6 @@ +languages: +- java +extensions: + services: + - Microsoft Graph +dependencyFile: /gradle/dependencies.gradle diff --git a/gradle.properties b/gradle.properties index 59b53e444..93527857c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,7 +25,7 @@ mavenGroupId = com.microsoft.graph mavenArtifactId = microsoft-graph-core mavenMajorVersion = 2 mavenMinorVersion = 0 -mavenPatchVersion = 1 +mavenPatchVersion = 2 mavenArtifactSuffix = #These values are used to run functional tests diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 6f0989f69..23858b144 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -9,5 +9,5 @@ dependencies { implementation 'com.google.guava:guava:30.1.1-jre' implementation 'com.google.code.gson:gson:2.8.6' - api 'com.azure:azure-identity:1.2.5' + api 'com.azure:azure-core:1.16.0' } \ No newline at end of file diff --git a/pom.xml b/pom.xml index cd380e434..d0659c0cc 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ com.microsoft.graph microsoft-graph-core - 2.0.1 + 2.0.2 pom @@ -25,7 +25,7 @@ com.google.guava guava - 30.1-jre + 30.1.1-jre com.squareup.okhttp3 @@ -34,19 +34,19 @@ com.azure - azure-identity - 1.2.0 + azure-core + 1.16.0 org.junit.jupiter junit-jupiter-api - 5.5.2 + 5.7.1 test org.mockito - mockito-core - 3.8.0 + mockito-inline + 3.9.0 test diff --git a/readme.md b/readme.md index fba8575a9..41f48045e 100644 --- a/readme.md +++ b/readme.md @@ -13,14 +13,16 @@ Get started with the Microsoft Graph Core SDK for Java by integrating the [Micro Add the repository and a compile dependency for `microsoft-graph-core` to your project's `build.gradle`: -```gradle +```groovy repositories { mavenCentral() } dependencies { // Include the sdk as a dependency - implementation 'com.microsoft.graph:microsoft-graph-core:2.0.1' + implementation 'com.microsoft.graph:microsoft-graph-core:2.0.2' + // This dependency is only needed if you are using the TokenCrendentialAuthProvider + implementation 'com.azure:azure-identity:1.2.5' } ``` @@ -30,9 +32,14 @@ Add the dependency in `dependencies` in pom.xml ```xml - com.microsoft.graph - microsoft-graph-core - 2.0.1 + + com.microsoft.graph + microsoft-graph-core + 2.0.2 + + com.azure + azure-identity + 1.2.5 ``` diff --git a/src/main/java/com/microsoft/graph/http/BaseDeltaCollectionRequest.java b/src/main/java/com/microsoft/graph/http/BaseDeltaCollectionRequest.java index 96f6e964d..40afa6faf 100644 --- a/src/main/java/com/microsoft/graph/http/BaseDeltaCollectionRequest.java +++ b/src/main/java/com/microsoft/graph/http/BaseDeltaCollectionRequest.java @@ -81,7 +81,7 @@ protected void addDeltaTokenOption(@Nonnull final String value, @Nonnull final S * ?token=thetoken (onedrive) * delta(token='thetoken') (formal OData function usage) */ - private static Pattern pattern = Pattern.compile("(?i)(?>\\$?delta)?token=['\"]?([\\w-\\.]+)"); + private static Pattern pattern = Pattern.compile("(?>[$]?delta)?token=['\"]?([\\w\\-\\.]+)", Pattern.CASE_INSENSITIVE); /** * Gets the delta token from the delta link provided by the previous response * @param deltaLink the delta link provided by the previous request @@ -91,9 +91,9 @@ protected void addDeltaTokenOption(@Nonnull final String value, @Nonnull final S protected String getDeltaTokenFromLink(@Nonnull final String deltaLink) { Objects.requireNonNull(deltaLink, "parameter deltaLink cannot be null"); final Matcher matcher = pattern.matcher(deltaLink); - if(matcher.matches()) { + if(matcher.find()) { return matcher.group(1); } - return ""; + return ""; } } diff --git a/src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java b/src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java index bb3f6d4aa..0d8f04962 100644 --- a/src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java +++ b/src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java @@ -25,7 +25,7 @@ public class TelemetryHandler implements Interceptor{ /** * Current SDK version */ - public static final String VERSION = "v2.0.1"; + public static final String VERSION = "v2.0.2"; /** * Verion prefix */