Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
3 changes: 3 additions & 0 deletions .github/workflows/api-level-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
distribution: 'temurin'
java-version: 21
cache: gradle
- name: Move generated sources to correct package
run: .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\beta\generated'
shell: pwsh
- name: Setup Android SDK
uses: android-actions/setup-android@v3.2.2
- name: Add execution right to the script
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
run: |
pip install detect-secrets
git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
- name: Move generated sources to correct package
run: .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\beta\generated'
shell: pwsh
- name: Grant Execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down Expand Up @@ -65,6 +68,9 @@ jobs:
cache: gradle
- name: Grant Execute permission for gradlew
run: chmod +x gradlew
- name: Move generated sources to correct package
run: .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\beta\generated'
shell: pwsh
- name: Build with Java 8
working-directory: ./java-8
run: .././gradlew -Dorg.gradle.jvmargs=-Xmx4g build
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/preview-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: gradle
- name: Move generated sources to correct package
run: .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\beta\generated'
shell: pwsh
- name: Download File
run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
Expand Down Expand Up @@ -76,6 +79,9 @@ jobs:
run: |
pip install detect-secrets
git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
- name: Move generated sources to correct package
run: .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\beta\generated'
shell: pwsh
- name: Download File
run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
Expand Down Expand Up @@ -129,6 +135,9 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION}}
cache: gradle
- name: Move generated sources to correct package
run: .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\beta\generated'
shell: pwsh
- name: Download file
run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def pomConfig = {
}
}

tasks.withType(Javadoc).all { enabled = false }
tasks.withType(Javadoc).configureEach {
enabled = false
options.addStringOption('Xdoclint:-missing', '-quiet')
}

tasks.jar {
manifest {
Expand Down
30 changes: 30 additions & 0 deletions scripts/copyFilesOnBuild.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

<#
.Synopsis
Copy files to a new location that is the parent of the current directory.
.Description
Receives an encoded string value and decodes it using base64.
Write the new decoded string to a local file for later consumption.
.Parameter inputPath
The encoded string we wish to decode.
#>

Param(
[Parameter(Mandatory = $true)][string]$inputPath
)

$fullPath = (Get-Item $inputPath).FullName
$parentDirectory = (Get-Item $inputPath).Parent
Push-Location $inputPath

Get-ChildItem '*' -Filter *.java -recurse | ForEach-Object {
$TargetDirectory = $_.DirectoryName.Replace($fullPath, "")
$TargetPath = Join-Path -Path $parentDirectory -ChildPath $TargetDirectory
If (!(Test-Path $TargetPath)) {
New-Item -Path $TargetPath -Type Directory -Force | out-null
}
$_ | Move-Item -Destination $TargetPath -Force
}
Pop-Location
Loading