File tree 2 files changed +9
-1
lines changed
packages/core/src/codewhisperer
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,14 @@ async function setBuildSystemCommand() {
108
108
transformByQState . getBuildSystem ( ) === BuildSystem . Maven ? 'mvn' : 'gradle'
109
109
)
110
110
}
111
+ const gradlewPath = path . join ( transformByQState . getProjectPath ( ) , 'gradlew' )
112
+ if ( fs . existsSync ( gradlewPath ) ) {
113
+ // TO-DO: maybe do this for mvnw too OR handle this in backend?
114
+ // replace Windows CRLF characters with LF characters so that our backend build can run
115
+ const wrapperData = fs . readFileSync ( gradlewPath ) . toString ( )
116
+ const newWrapperData = wrapperData . replace ( / \r \n / g, '\n' )
117
+ fs . writeFileSync ( gradlewPath , newWrapperData )
118
+ }
111
119
getLogger ( ) . info ( `CodeTransformation: set build system command to ${ transformByQState . getBuildSystemCommand ( ) } ` )
112
120
}
113
121
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ export enum JDKVersion {
310
310
311
311
export enum BuildSystem {
312
312
Maven = 'Maven' ,
313
- Gradle = 'Gradle' ,
313
+ Gradle = 'GRADLE' , // needs to be all caps for backend; TO-DO: fix this by using equalsIgnoreCase in backend
314
314
Unknown = 'Unknown' ,
315
315
}
316
316
You can’t perform that action at this time.
0 commit comments