Error on bob aar build
Question
Hello,
My goal is to build an aar using bob. After I've executed create script:
npx @react-native-community/bob create react-native-awesome-module
I have added aar to targets in package.json:
"@react-native-community/bob": {
"source": "src",
"output": "lib",
"targets": [
["aar", { "reverseJetify": true }],
"commonjs",
"module",
"typescript"
]
}
The error I get is as follows:
D:\react-native-awesome-module>bob build
ℹ Building target aar
ℹ Cleaning up previous build at lib\aar
ℹ Assembling Android project in android with gradle
bob.js build
build files for publishing
Options:
--help Show help [boolean]
--version Show version number [boolean]
Error: The gradlew script doesn't seem to present in android. Make sure you have added it by running gradle wrapper in that directory.
at androidAssemble (D:\react-native-awesome-module\node_modules\@react-native-community\bob\lib\utils\androidAssemble.js:35:11)
at async build (D:\react-native-awesome-module\node_modules\@react-native-community\bob\lib\targets\aar.js:44:3)
at async Object.handler (D:\react-native-awesome-module\node_modules\@react-native-community\bob\lib\cli.js:320:9)
Both gradlew and gradlew.bat files do present in android directory.

Should I add some extra configuration to build an aar or I have missed something in docs?
Thanks in advance!
cc @matt-oakes any ideas?
I think this is the issue here. On windows, gradleWrapper gets resolved to ./gradlew./gradlew.bat which doesn't work. I changed that line to the following and it ran without problems:
const gradleWrapper = ((0, _os.platform)() === 'win32' ? 'gradlew.bat' : './gradlew');
@chadmorrow Thank you for finding the solution! Perhaps you would like to make a PR solving this issue with the fix you found?
Sure! I can work on that later today
@chadmorrow Thank you! I assigned you to this item just in case. Take your time and thank you for contributing!
I ran into the same problem. I'll try it your way. @chadmorrow
@chadmorrow how to implement const gradleWrapper = ((0, _os.platform)() === 'win32' ? 'gradlew.bat' : './gradlew'); this file or other reference