diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index feaa1c0e..00000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,628 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Add ToTriage label to new issues", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "ToTriage" - } - }, - { - "name": "addToProject", - "parameters": { - "projectName": "Graph SDK - Triage", - "columnName": "Issues to triage", - "isOrgProject": true - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "3S9VQGzLh" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "Replace needs author feedback label with needs attention label when the author comments on an issue", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: author feedback" - } - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "needs attention" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: author feedback" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - }, - "id": "kPh1SPQ4vv" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label from issues", - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "7wrWTLPtQO" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 1, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 2, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 3, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 4, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 5, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 6, - "hours": [ - 1, - 7, - 13, - 19 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: author feedback" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 3 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "service bug" - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "LoWL0pmcGB", - "disabled": false - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 1, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 2, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 3, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 4, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 5, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 6, - "hours": [ - 1, - 7, - 13, - 19 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: author feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 4 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**." - } - } - ] - }, - "id": "rxcR2jZDQd", - "disabled": false - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close duplicate issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 1, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 2, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 3, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 4, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 5, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 6, - "hours": [ - 1, - 7, - 13, - 19 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "duplicate" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 1 - } - } - ], - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "q9_57QI7gW", - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "service bug" - } - } - ] - }, - "taskName": "Add service issue to Service Issues project", - "actions": [ - { - "name": "addToProject", - "parameters": { - "projectName": "Service issues", - "columnName": "Issues to triage", - "isOrgProject": true - } - } - ] - }, - "id": "0LMKPZRJfy" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "permissions": "write", - "association": "CONTRIBUTOR" - } - }, - { - "name": "bodyContains", - "parameters": { - "bodyPattern": "?" - } - }, - { - "name": "bodyContains", - "parameters": { - "bodyPattern": "@" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Set 'Needs Feedback' if we respond with a question and at mention", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: author feedback" - } - } - ] - }, - "id": "UdAXCHZzhq" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "or", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - }, - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Remove ToTriage when assigned or response provided", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "ToTriage" - } - } - ] - }, - "id": "MyMQeNnzO3" - } - ], - "userGroups": [] -} diff --git a/.github/policies/msgraph-sdk-java-core-branch-protection.yml b/.github/policies/msgraph-sdk-java-core-branch-protection.yml index 0ee8a9b2..7f17e970 100644 --- a/.github/policies/msgraph-sdk-java-core-branch-protection.yml +++ b/.github/policies/msgraph-sdk-java-core-branch-protection.yml @@ -26,7 +26,7 @@ configuration: # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required requiredApprovingReviewsCount: 1 # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean - requireCodeOwnersReview: false + requireCodeOwnersReview: true # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. requiresCommitSignatures: false # Are conversations required to be resolved before merging? boolean @@ -38,10 +38,10 @@ configuration: - license/cla - Build - lint-api-level - - Analyze + - Analyze (java) - build # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean - requiresStrictStatusChecks: false + requiresStrictStatusChecks: true # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. restrictsPushes: false # Restrict who can dismiss pull request reviews. boolean @@ -64,7 +64,7 @@ configuration: # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required requiredApprovingReviewsCount: 1 # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean - requireCodeOwnersReview: false + requireCodeOwnersReview: true # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. requiresCommitSignatures: false # Are conversations required to be resolved before merging? boolean @@ -76,10 +76,10 @@ configuration: - license/cla - Build - lint-api-level - - Analyze + - Analyze (java) - build # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean - requiresStrictStatusChecks: false + requiresStrictStatusChecks: true # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. restrictsPushes: false # Restrict who can dismiss pull request reviews. boolean @@ -106,18 +106,18 @@ configuration: # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. requiresCommitSignatures: false # Are conversations required to be resolved before merging? boolean - requiresConversationResolution: false + requiresConversationResolution: true # Are merge commits prohibited from being pushed to this branch. boolean requiresLinearHistory: false # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status requiredStatusChecks: - - Analyze + - Analyze (java) - Build - build - license/cla - lint-api-level # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean - requiresStrictStatusChecks: false + requiresStrictStatusChecks: true # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. restrictsPushes: false # Restrict who can dismiss pull request reviews. boolean diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 00000000..5c8ba364 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,118 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: author feedback' + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 3 + - isNotLabeledWith: + label: service bug + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: author feedback' + - noActivitySince: + days: 4 + - isNotLabeledWith: + label: no-recent-activity + actions: + - addLabel: + label: no-recent-activity + - addReply: + reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: duplicate + - noActivitySince: + days: 1 + actions: + - addReply: + reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes. + - closeIssue + eventResponderTasks: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: author feedback' + then: + - addLabel: + label: needs attention + - removeLabel: + label: 'Needs: author feedback' + description: + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Issues + - labelAdded: + label: service bug + then: [] + description: + - if: + - payloadType: Issue_Comment + - activitySenderHasAssociation: + association: Contributor + - bodyContains: + pattern: '?' + isRegex: False + - bodyContains: + pattern: '@' + isRegex: False + then: + - addLabel: + label: 'Needs: author feedback' + description: + - if: + - payloadType: Issues + - or: + - isAssignedToSomeone + - isAction: + action: Closed + then: + - removeLabel: + label: ToTriage + description: +onFailure: +onSuccess: diff --git a/.github/workflows/api-level-lint.yml b/.github/workflows/api-level-lint.yml index 902e7347..80dd4d01 100644 --- a/.github/workflows/api-level-lint.yml +++ b/.github/workflows/api-level-lint.yml @@ -15,13 +15,13 @@ jobs: lint-api-level: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 18 + distribution: 'temurin' + java-version: 20 - name: Setup Android SDK - uses: android-actions/setup-android@v2.0.10 + uses: android-actions/setup-android@v3.0.0 - name: Add execution right to the script run: chmod +x gradlew working-directory: ./android diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml index 86df4202..6e5953f5 100644 --- a/.github/workflows/auto-merge-dependabot.yml +++ b/.github/workflows/auto-merge-dependabot.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.5.1 + uses: dependabot/fetch-metadata@v1.6.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index bf6a09bc..5d4361f9 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -20,14 +20,14 @@ jobs: name: maven_central_snapshot runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Easy detect-secrets uses: RobertFischer/detect-secrets-action@v2.0.0 - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 18 - distribution: 'adopt' + java-version: 20 + distribution: 'temurin' cache: gradle - name: Download file run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH @@ -52,14 +52,14 @@ jobs: name: maven_central_release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Easy detect-secrets uses: RobertFischer/detect-secrets-action@v2.0.0 - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 18 - distribution: 'adopt' + java-version: 20 + distribution: 'temurin' cache: gradle - name: Download file run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH @@ -99,13 +99,13 @@ jobs: env: RELEASE_TAG: "" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get Version id: GetVersion run: .\scripts\getLatestVersion.ps1 shell: pwsh - name: Create tag - uses: rickstaa/action-create-tag@v1.6.2 + uses: rickstaa/action-create-tag@v1.6.4 with: tag: ${{ steps.GetVersion.outputs.tag }} - name: Queue Git Release diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d024376b..2d515469 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,51 +1,86 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# name: "CodeQL" on: - workflow_dispatch: push: - branches: [dev, master] + branches: [ "dev", "master" ] pull_request: # The branches below must be a subset of the branches above - branches: [dev] + branches: [ "dev" ] schedule: - cron: '0 1 * * 4' + workflow_dispatch: jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - name: Set up JDK + uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 18 + java-version: 20 + distribution: 'temurin' + cache: gradle # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 - # Override language selection by uncommenting this and choosing your languages with: - languages: java + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # - name: Autobuild + # uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - #- run: | - # make bootstrap - # make release + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/git-release.yml b/.github/workflows/git-release.yml index f95a95cd..975198d5 100644 --- a/.github/workflows/git-release.yml +++ b/.github/workflows/git-release.yml @@ -10,9 +10,9 @@ jobs: Git_Release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download Build Artifact - uses: dawidd6/action-download-artifact@v2.27.0 + uses: dawidd6/action-download-artifact@v2.28.0 with: workflow: build-and-publish.yml workflow_conclusion: success diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index ea1f6ef1..ad788543 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -15,12 +15,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 18 - distribution: 'adopt' + java-version: 20 + distribution: 'temurin' cache: gradle - name: Easy detect-secrets uses: RobertFischer/detect-secrets-action@v2.0.0 diff --git a/.github/workflows/projectsbot.yml b/.github/workflows/projectsbot.yml index 3532a8b6..6f1e8ff5 100644 --- a/.github/workflows/projectsbot.yml +++ b/.github/workflows/projectsbot.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Generate token id: generate_token - uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a with: app_id: ${{ secrets.GRAPHBOT_APP_ID }} private_key: ${{ secrets.GRAPHBOT_APP_PEM }} diff --git a/.github/workflows/sample-build-check.yml b/.github/workflows/sample-build-check.yml index 6c2bfc43..4a2a58f8 100644 --- a/.github/workflows/sample-build-check.yml +++ b/.github/workflows/sample-build-check.yml @@ -11,11 +11,11 @@ jobs: samples-build-check-device-code: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 18 + distribution: 'temurin' + java-version: 20 - name: Add execution right to the script run: chmod +x gradlew working-directory: ./samples/deviceCodeSample @@ -25,11 +25,11 @@ jobs: samples-build-check-interactive: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 18 + distribution: 'temurin' + java-version: 20 - name: Add execution right to the script run: chmod +x gradlew working-directory: ./samples/interactiveBrowserSample diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 12a91e11..c7b36734 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -13,14 +13,14 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 18 - distribution: 'adopt' + java-version: 20 + distribution: 'temurin' cache: gradle - name: Cache SonarCloud packages uses: actions/cache@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index a0340680..27061f84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +## [2.0.20] - 2023-10-23 + +### Changed + +- Updates Okhttp3 to avoid transient vulnerabilty. [#1038](https://github.com/microsoftgraph/msgraph-sdk-java-core/issues/1038) + ## [2.0.19] - 2023-06-20 ### Changed diff --git a/android/build.gradle b/android/build.gradle index f97fc92e..cbd45157 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,9 +8,9 @@ buildscript { } dependencies { - classpath "com.gradle:gradle-enterprise-gradle-plugin:3.13.4" - classpath "com.android.tools.build:gradle:8.0.2" - classpath "com.github.ben-manes:gradle-versions-plugin:0.47.0" + classpath "com.gradle:gradle-enterprise-gradle-plugin:3.15.1" + classpath "com.android.tools.build:gradle:8.1.2" + classpath "com.github.ben-manes:gradle-versions-plugin:0.49.0" } } diff --git a/android/gradle.properties b/android/gradle.properties index c375db3d..385adb9f 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -27,7 +27,7 @@ mavenGroupId = com.microsoft.graph mavenArtifactId = microsoft-graph-core mavenMajorVersion = 2 mavenMinorVersion = 3 -mavenPatchVersion = 2 +mavenPatchVersion = 3 mavenArtifactSuffix = #These values are used to run functional tests diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar index 41d9927a..c1962a79 100644 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 59bc51a2..37aef8d3 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew index 1b6c7873..aeb74cbb 100644 --- a/android/gradlew +++ b/android/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -205,6 +210,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/android/gradlew.bat b/android/gradlew.bat index 107acd32..93e3f59f 100644 --- a/android/gradlew.bat +++ b/android/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/build.gradle b/build.gradle index e37eca6a..608fda59 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,3 @@ -/* - * This file was generated by the Gradle 'init' task. - * - * This generated file contains a sample Java Library project to get you started. - * For more details take a look at the Java Libraries chapter in the Gradle - * User Manual available at https://docs.gradle.org/6.6/userguide/java_library_plugin.html - */ - plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' @@ -14,24 +6,27 @@ plugins { id 'maven-publish' id 'signing' id 'jacoco' - id 'com.github.spotbugs' version '5.0.14' - id "org.sonarqube" version "4.2.1.3168" + id 'com.github.spotbugs' version '5.2.1' + id "org.sonarqube" version "4.4.1.3373" } java { modularity.inferModulePath = true + withSourcesJar() + withJavadocJar() } test { useJUnitPlatform() finalizedBy jacocoTestReport // report is always generated after tests run } + jacocoTestReport { dependsOn test // tests are required to run before generating the report } jacoco { - toolVersion = "0.8.7" + toolVersion = "0.8.10" } spotbugsMain { @@ -39,7 +34,7 @@ spotbugsMain { reports { html { required - destination = file("$buildDir/reports/spotbugs/main/spotbugs.html") + outputLocation = file("$buildDir/reports/spotbugs/main/spotbugs.html") stylesheet = 'fancy-hist.xsl' } } @@ -50,7 +45,7 @@ spotbugsTest { reports { html { required - destination = file("$buildDir/reports/spotbugs/test/spotbugs.html") + outputLocation = file("$buildDir/reports/spotbugs/test/spotbugs.html") stylesheet = 'fancy-hist.xsl' } } @@ -74,7 +69,6 @@ sourceSets { repositories { // You can declare any Maven/Ivy/file repository here. mavenCentral() - maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } // for jacoco, until 0.8.7 gets released } apply from: "gradle/dependencies.gradle" @@ -108,16 +102,6 @@ tasks.jar { } } -task sourceJar(type: Jar) { - from sourceSets.main.allJava - archiveClassifier = 'sources' -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - from javadoc.destinationDir - archiveClassifier = 'javadoc' -} - publishing { publications { @@ -127,8 +111,6 @@ publishing { artifactId project.property('mavenArtifactId') version "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}${mavenArtifactSuffix}" from components.java - artifact sourceJar - artifact javadocJar pom.withXml { def root = asNode() root.appendNode('name', 'Microsoft Graph Core SDK for Java') @@ -149,8 +131,6 @@ publishing { def pomFile = file("${project.buildDir}/generated-pom.xml") writeTo(pomFile) } - artifact sourceJar - artifact javadocJar } mavenCentralRelease(MavenPublication) { @@ -163,8 +143,6 @@ publishing { def pomFile = file("${project.buildDir}/generated-pom.xml") writeTo(pomFile) } - artifact sourceJar - artifact javadocJar } } repositories { @@ -212,8 +190,9 @@ def fixAscNames = { name -> } compileJava { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 + options.compilerArgs << "-parameters" + sourceCompatibility = '1.8' + targetCompatibility = '1.8' } def getVersionCode() { @@ -226,8 +205,6 @@ def getVersionName() { artifacts { archives jar - archives sourceJar - archives javadocJar } def customizePom(pom) { diff --git a/gradle.properties b/gradle.properties index ef937622..c270067b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,7 +25,7 @@ mavenGroupId = com.microsoft.graph mavenArtifactId = microsoft-graph-core mavenMajorVersion = 2 mavenMinorVersion = 0 -mavenPatchVersion = 19 +mavenPatchVersion = 20 mavenArtifactSuffix = #These values are used to run functional tests diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 904e2471..e30e65e2 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -1,16 +1,16 @@ dependencies { // Use JUnit test framework - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3' - testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.3' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3' + 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.mockito:mockito-inline:5.2.0' - api 'com.squareup.okhttp3:okhttp:4.11.0' + api 'com.squareup.okhttp3:okhttp:4.12.0' - implementation 'com.google.guava:guava:32.0.1-jre' + implementation 'com.google.guava:guava:32.1.3-jre' implementation 'com.google.code.gson:gson:2.10.1' - api 'com.azure:azure-core:1.40.0' + api 'com.azure:azure-core:1.44.1' - api 'com.github.spotbugs:spotbugs-annotations:4.7.3' + api 'com.github.spotbugs:spotbugs-annotations:4.8.0' } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927a..c1962a79 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 59bc51a2..37aef8d3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c7873..aeb74cbb 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -205,6 +210,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32..93e3f59f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/pom.xml b/pom.xml index 88f6646b..59f07acd 100644 --- a/pom.xml +++ b/pom.xml @@ -25,28 +25,28 @@ com.google.guava guava - 32.0.1-jre + 32.1.3-jre com.squareup.okhttp3 okhttp - 4.11.0 + 4.12.0 com.azure azure-core - 1.40.0 + 1.44.1 org.junit.jupiter junit-jupiter-api - 5.9.3 + 5.10.0 test org.junit.jupiter junit-jupiter-params - 5.9.3 + 5.10.0 test @@ -58,7 +58,7 @@ com.github.spotbugs spotbugs-annotations - 4.7.3 + 4.8.0 diff --git a/readme.md b/readme.md index f169081f..748e700c 100644 --- a/readme.md +++ b/readme.md @@ -22,9 +22,9 @@ repositories { dependencies { // Include the sdk as a dependency - implementation 'com.microsoft.graph:microsoft-graph-core:2.0.19' + implementation 'com.microsoft.graph:microsoft-graph-core:2.0.20' // This dependency is only needed if you are using the TokenCredentialAuthProvider - implementation 'com.azure:azure-identity:1.7.2' + implementation 'com.azure:azure-identity:1.10.2' } ``` @@ -37,11 +37,11 @@ Add the dependency in `dependencies` in pom.xml com.microsoft.graph microsoft-graph-core - 2.0.16 + 2.0.20 com.azure azure-identity - 1.7.2 + 1.10.2 ``` diff --git a/samples/deviceCodeSample/build.gradle b/samples/deviceCodeSample/build.gradle index 52e836e0..9271f2db 100644 --- a/samples/deviceCodeSample/build.gradle +++ b/samples/deviceCodeSample/build.gradle @@ -12,5 +12,5 @@ repositories { dependencies { testImplementation group: 'junit', name: 'junit', version: '4.13.2' implementation project(':coreLibrary') - implementation 'com.azure:azure-identity:1.9.1' + implementation 'com.azure:azure-identity:1.10.4' } diff --git a/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.jar b/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.jar index 249e5832..c1962a79 100644 Binary files a/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.jar and b/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.properties b/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.properties index ae04661e..37aef8d3 100644 --- a/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.properties +++ b/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/samples/deviceCodeSample/gradlew b/samples/deviceCodeSample/gradlew index a69d9cb6..aeb74cbb 100644 --- a/samples/deviceCodeSample/gradlew +++ b/samples/deviceCodeSample/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/samples/deviceCodeSample/gradlew.bat b/samples/deviceCodeSample/gradlew.bat index f127cfd4..93e3f59f 100644 --- a/samples/deviceCodeSample/gradlew.bat +++ b/samples/deviceCodeSample/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% diff --git a/samples/interactiveBrowserSample/build.gradle b/samples/interactiveBrowserSample/build.gradle index 52e836e0..9271f2db 100644 --- a/samples/interactiveBrowserSample/build.gradle +++ b/samples/interactiveBrowserSample/build.gradle @@ -12,5 +12,5 @@ repositories { dependencies { testImplementation group: 'junit', name: 'junit', version: '4.13.2' implementation project(':coreLibrary') - implementation 'com.azure:azure-identity:1.9.1' + implementation 'com.azure:azure-identity:1.10.4' } diff --git a/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.jar b/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.jar index 249e5832..c1962a79 100644 Binary files a/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.jar and b/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.properties b/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.properties index ae04661e..37aef8d3 100644 --- a/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.properties +++ b/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/samples/interactiveBrowserSample/gradlew b/samples/interactiveBrowserSample/gradlew index a69d9cb6..aeb74cbb 100644 --- a/samples/interactiveBrowserSample/gradlew +++ b/samples/interactiveBrowserSample/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/samples/interactiveBrowserSample/gradlew.bat b/samples/interactiveBrowserSample/gradlew.bat index f127cfd4..93e3f59f 100644 --- a/samples/interactiveBrowserSample/gradlew.bat +++ b/samples/interactiveBrowserSample/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% diff --git a/spotBugsExcludeFilter.xml b/spotBugsExcludeFilter.xml index c6b2fff2..26f35d7e 100644 --- a/spotBugsExcludeFilter.xml +++ b/spotBugsExcludeFilter.xml @@ -3,11 +3,48 @@ xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java b/src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java index 6d3e6d99..e0920b5c 100644 --- a/src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java +++ b/src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java @@ -24,7 +24,7 @@ public class TelemetryHandler implements Interceptor{ /** * Current SDK version */ - public static final String VERSION = "v2.0.19"; + public static final String VERSION = "v2.0.20"; /** * Version prefix */