dariosalvi78 opened a new issue, #1524:
URL: https://github.com/apache/cordova-android/issues/1524
# Bug Report
## Problem
I have a simple plugin with an external .aar library. The pluign has
`<lib-file src="path_to_.aar" />` declared in plugin.xml.
When trying to build the project, a file named app-pluginame.gradle is
generated automatically, my understanding is that this is done by the android
platform.
When gradle 7.6 tries to put the code all together it complains about a
`compile()` directive. I changed `compile()` to `implementation`manually and
now it works.
### What is expected to happen?
`compile()` is deprecated, `implementation`should be used in the
automatically generated file.
### What does actually happen?
In the automatically generated file, I find:
```
dependencies {
compile(name:'nameOfTheLib', ext:'aar')
}
```
I changed `compile()` to `implementation`manually and now it works.
## Information
I could not find the exact file or files responsible for this error,
otherwise I would have sent a PR, sorry!
### Command or Code
To reproduce, create a simple plugin with an external compiled library for
Android, add the lib-file tag in the plugin.xml and import the plugin into a
basic cordova app. Compile the app with `cordova build android` and check the
output from Gradle. I used gradle 7.6, as far as I can tell gradle >7 has
banned "compile()" completely.
### Environment, Platform, Device
mac os ventura 13.0.1
android
ONEPLUS A5010
### Version information
openjdk 11.0.16
gradle 7.6
cordova 11.0.0
cordova android 11.0.0
android studi dolphin (irrelevant)
SDK Build Tool: 32.0.0
## Checklist
- [X] I searched for existing GitHub issues
- [X] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]