bug: capacitor's build gradle script does not get module's build script.
See original GitHub issueBug Report
Capacitor Version
❯ npx cap doctor
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 2.4.6
@capacitor/core: 2.4.6
@capacitor/android: 2.4.6
@capacitor/electron: 2.4.6
@capacitor/ios: 2.4.6
Installed Dependencies:
@capacitor/cli 2.4.5
@capacitor/android 2.4.5
@capacitor/ios 2.4.5
@capacitor/core 2.4.5
@capacitor/electron not installed
[success] Android looking great! 👌
Found 9 Capacitor plugins for ios:
@capacitor-community/fcm (1.0.8)
@capacitor-community/firebase-analytics (0.2.0)
@capacitor-community/firebase-crashlytics (0.3.0)
@capacitor-community/http (0.2.1)
@capacitor-community/uxcam (0.0.3)
@diachedelic/capacitor-background-geolocation (0.3.4)
capacitor-firebase-auth (2.3.2)
card.io.cordova.mobilesdk (2.1.0)
cordova-plugin-inappbrowser (4.1.0)
[success] iOS looking great! 👌
Platform(s)
- Android
Current Behavior
When the build task is launched, it just takes the main build script as base and from it, gradle just take the repositories:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.uxcam:uxcam:3.3.4.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/uxcam/uxcam/3.3.4/uxcam-3.3.4.pom
- https://jcenter.bintray.com/com/uxcam/uxcam/3.3.4/uxcam-3.3.4.pom
- file:/Users/luisalaguna/Projects/geliver-ionic-react/android/capacitor-cordova-android-plugins/src/main/libs/uxcam-3.3.4.aar
- file:/Users/luisalaguna/Projects/geliver-ionic-react/android/capacitor-cordova-android-plugins/src/main/libs/uxcam.aar
- file:/Users/luisalaguna/Projects/geliver-ionic-react/android/app/libs/uxcam-3.3.4.aar
- file:/Users/luisalaguna/Projects/geliver-ionic-react/android/app/libs/uxcam.aar
- https://repo.maven.apache.org/maven2/com/uxcam/uxcam/3.3.4/uxcam-3.3.4.pom
Required by:
project :app > project :capacitor-community-uxcam
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Expected Behavior
It should not be needed to put the required repositories in the main build script file but it should get also repositories from its dependencies(plugins).
Code Reproduction
plugin’s build.gradle
:
repositories {
jcenter()
maven {
url 'https://sdk.uxcam.com/android/'
}
}
Other Technical Details
npm --version
output: 7.0.15
node --version
output: v15.4.0
pod --version
output (iOS issues only): 1.10.0
Additional Context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
capacitor.settings.gradle' as it does not exist - Stack Overflow
So the build folder is not "build", it is "out". Just go to the capacitor.config.json and change the webDir property to out.
Read more >Cannot finish Capacitor 4 migration due to build error
There was a bug on the migrate command that has been fixed but not released yet that causes the variables.gradle to be broken...
Read more >Troubleshooting Android Issues | Capacitor Documentation
This error is often due to Gradle needing to be synced, something you'll need to do periodically after updating dependencies and changing project...
Read more >Troubleshooting builds - Gradle User Manual
You can verify the problem is with Gradle scripts by running gradle help which executes configuration scripts, but no Gradle tasks.
Read more >Add build dependencies - Android Developers
Gradle adds the dependency to the compile classpath only (that is, it is not added to the build output). This is useful when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jcesarmobile At first it does not show any problem at building time, but later, the plugin’s class cannot find the UXCam java class from the compiled aar; hence, i had to revert it:
try using
compileOnly 'com.uxcam:uxcam:3.3.4@aar'
instead ofimplementation 'com.uxcam:uxcam:3.3.4@aar'
, that way only your plugin compiles the aar and other modules don’t need to know about it.