Commit 9eec01c 1 parent 5d2db8e commit 9eec01c Copy full SHA for 9eec01c
File tree 4 files changed +48
-0
lines changed
4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 17
17
distribution : ' temurin'
18
18
java-version : 21
19
19
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
20
23
- name : Setup Android SDK
21
24
uses : android-actions/setup-android@v3.2.2
22
25
- name : Add execution right to the script
Original file line number Diff line number Diff line change 22
22
run : |
23
23
pip install detect-secrets
24
24
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
25
28
- name : Grant Execute permission for gradlew
26
29
run : chmod +x gradlew
27
30
- name : Build with Gradle
60
63
java-version : 8
61
64
distribution : ' temurin'
62
65
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
63
69
- name : Grant Execute permission for gradlew
64
70
run : chmod +x gradlew
65
71
- name : Build with Java 8
Original file line number Diff line number Diff line change 37
37
java-version : ${{ env.JAVA_VERSION }}
38
38
distribution : ${{ env.JAVA_DISTRIBUTION}}
39
39
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
40
43
- name : Detect secrets
41
44
run : |
42
45
pip install detect-secrets
76
79
run : |
77
80
pip install detect-secrets
78
81
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
79
85
- name : Download File
80
86
run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
81
87
shell : pwsh
@@ -129,6 +135,9 @@ jobs:
129
135
java-version : ${{ env.JAVA_VERSION }}
130
136
distribution : ${{ env.JAVA_DISTRIBUTION}}
131
137
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
132
141
- name : Download file
133
142
run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
134
143
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