Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get dependencies to build and work locally #90

Closed
dannybduval opened this issue Sep 20, 2024 · 1 comment
Closed

Cannot get dependencies to build and work locally #90

dannybduval opened this issue Sep 20, 2024 · 1 comment

Comments

@dannybduval
Copy link

dannybduval commented Sep 20, 2024

When attempting to run composer tasks, we are getting the following errors:

Could not determine the dependencies of task ':basemodule:testDeltaDebugComposer'.
Could not resolve all task dependencies for configuration ':basemodule:composer'.
Could not resolve com.trevjonez.composer:composer:1.0.0-rc08.
Required by:
project :basemodule
> Could not resolve com.trevjonez.composer:composer:1.0.0-rc08.
> //repo1.here.com/com/trevjonez/composer/composer/1.0.0-rc08/composer-1.0.0-rc08.pom'.
> continue for each repo in dependency block

When we first started seeing this, simply added maven{ url "https://jcenter.bintray.com/"} to our project's dependencies block and we were now good with composer:1.0.0-rc8, commander-os:1.0.0-rc8 and commander-android:1.0.0-rc8. It now seems that they are gone. I also know that #84 is open to try and avoid this.

Knowing that, I cloned the repository locally and adjusted from the branch we currently use - rc08 with the
attached patch. This was needed as there's other dependencies that are no longer available for various reasons. All compiled and worked and I was able to publishMainJarPublicationToMavenLocal successfully for each dependency.

The problem now is that I run into this error when trying to run check as well as use the plug in with my project when I point to the local dependencies for composer and commander(os/android).

Task :testDebugComposer FAILED
Exception in thread "main" java.lang.NoClassDefFoundError: com/gojuno/commander/android/AdbKt
at com.gojuno.composer.ApkKt.parseTestPackage(Apk.kt:21)
at com.gojuno.composer.MainKt.main(Main.kt:45)
Caused by: java.lang.ClassNotFoundException: com.gojuno.commander.android.AdbKt
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 2 more

If preferred, I can push the branch up that I used rather than replying on the generated patch.

@dannybduval
Copy link
Author

Found the issue. I had changed the version everywhere else to avoid caching issues on machines and had missed this one - https://github.com/trevjonez/composer-gradle-plugin/blob/master/plugin/src/main/kotlin/com/trevjonez/composer/ComposerConfig.kt#L28

Once aligned with the others (e.g., in gradle.properties), all works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant