File tree Expand file tree Collapse file tree 4 files changed +48
-0
lines changed
Expand file tree Collapse file tree 4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1717 distribution : ' temurin'
1818 java-version : 21
1919 cache : gradle
20+ - name : Move generated sources to correct package
21+ run : .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\generated'
22+ shell : pwsh
2023 - name : Setup Android SDK
2124 uses :
android-actions/[email protected] 2225 - name : Add execution right to the script
Original file line number Diff line number Diff line change 2222 run : |
2323 pip install detect-secrets
2424 git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
25+ - name : Move generated sources to correct package
26+ run : .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\generated'
27+ shell : pwsh
2528 - name : Grant Execute permission for gradlew
2629 run : chmod +x gradlew
2730 - name : Build with Gradle
6063 java-version : 8
6164 distribution : ' temurin'
6265 cache : gradle
66+ - name : Move generated sources to correct package
67+ run : .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\generated'
68+ shell : pwsh
6369 - name : Grant Execute permission for gradlew
6470 run : chmod +x gradlew
6571 - name : Build with Java 8
Original file line number Diff line number Diff line change 3737 java-version : ${{ env.JAVA_VERSION }}
3838 distribution : ${{ env.JAVA_DISTRIBUTION}}
3939 cache : gradle
40+ - name : Move generated sources to correct package
41+ run : .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\generated'
42+ shell : pwsh
4043 - name : Detect secrets
4144 run : |
4245 pip install detect-secrets
7679 run : |
7780 pip install detect-secrets
7881 git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
82+ - name : Move generated sources to correct package
83+ run : .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\generated'
84+ shell : pwsh
7985 - name : Download File
8086 run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
8187 shell : pwsh
@@ -129,6 +135,9 @@ jobs:
129135 java-version : ${{ env.JAVA_VERSION }}
130136 distribution : ${{ env.JAVA_DISTRIBUTION}}
131137 cache : gradle
138+ - name : Move generated sources to correct package
139+ run : .\scripts\copyFilesOnBuild.ps1 -inputPath '.\src\main\java\com\microsoft\graph\generated'
140+ shell : pwsh
132141 - name : Download file
133142 run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
134143 shell : pwsh
Original file line number Diff line number Diff line change 1+ # Copyright (c) Microsoft Corporation. All rights reserved.
2+ # Licensed under the MIT License.
3+
4+ <#
5+ . Synopsis
6+ Copy files to a new location that is the parent of the current directory.
7+ . Description
8+ Receives an encoded string value and decodes it using base64.
9+ Write the new decoded string to a local file for later consumption.
10+ . Parameter inputPath
11+ The encoded string we wish to decode.
12+ #>
13+
14+ Param (
15+ [Parameter (Mandatory = $true )][string ]$inputPath
16+ )
17+
18+ $fullPath = (Get-Item $inputPath ).FullName
19+ $parentDirectory = (Get-Item $inputPath ).Parent
20+ Push-Location $inputPath
21+
22+ Get-ChildItem ' *' - Filter * .java - recurse | ForEach-Object {
23+ $TargetDirectory = $_.DirectoryName.Replace ($fullPath , " " )
24+ $TargetPath = Join-Path - Path $parentDirectory - ChildPath $TargetDirectory
25+ If (! (Test-Path $TargetPath )) {
26+ New-Item - Path $TargetPath - Type Directory - Force | out-null
27+ }
28+ $_ | Move-Item - Destination $TargetPath - Force
29+ }
30+ Pop-Location
You can’t perform that action at this time.
0 commit comments