Skip to content

Error on bob aar build #79

@LerDelijan

Description

@LerDelijan

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.
image

Should I add some extra configuration to build an aar or I have missed something in docs?

Thanks in advance!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions