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

extra dependencies needed in project #11

Closed
bergvandenp opened this issue Dec 20, 2018 · 8 comments
Closed

extra dependencies needed in project #11

bergvandenp opened this issue Dec 20, 2018 · 8 comments

Comments

@bergvandenp
Copy link

To get the plugin working, I need to add some dependencies in my project. That shouldn't be needed, but if I don't, I get classNotFound errors. What am I doing wrong?

classpath 'com.squareup.okhttp3:okhttp:3.12.0'
classpath 'com.j256.simplemagic:simplemagic:1.10'
classpath 'org.zeroturnaround:zt-exec:1.10'
@BreadMoirai
Copy link
Owner

BreadMoirai commented Dec 26, 2018

I might be able to help you better if you upload your gradle build file. This plugin shouldn't require you to add any dependencies yourself.

@BreadMoirai
Copy link
Owner

You may need to add an extra snippet to the top of your build.gradle file

buildscript {
  repositories {
    jcenter()
  }
}

@bergvandenp
Copy link
Author

thanks for the suggestion, but that doesn't work. This is the same issue as #9
I think it's caused by the way the dependecies are decleared (implementation).
https://docs.gradle.org/current/userguide/managing_transitive_dependencies.html

@stewartbryson
Copy link

You may need to add an extra snippet to the top of your build.gradle file

buildscript {
  repositories {
    jcenter()
  }
}

Gradle does this be default... using jCenter to resolve dependencies.

I'm having issues resolving OkHttpClient, and the buildscript recommendation does not help. Any ideas?

java.lang.NoClassDefFoundError: okhttp3/OkHttpClient

@stewartbryson
Copy link

stewartbryson commented Jan 9, 2019

thanks for the suggestion, but that doesn't work. This is the same issue as #9
I think it's caused by the way the dependecies are decleared (implementation).
https://docs.gradle.org/current/userguide/managing_transitive_dependencies.html

I'm not sure about the change to api and implementation... I still use compile for most everything. I have tested using implementation with Gradle plugins and I see this issue. So I believe a simple compile would fix this. However... I'm not sure what the preferred approach is. Should it be api to create the transitive dependencies?

Regardless... I added this to my build script and it corrected it:

buildscript {
   dependencies {
      classpath 'com.squareup.okhttp3:okhttp:3.12.0'
      classpath 'com.j256.simplemagic:simplemagic:1.10'
      classpath 'org.zeroturnaround:zt-exec:1.10'
   }
}

Again... using compile in all my plugins, I never have to do this when the libs are on jCenter.

@kevinmmarlow
Copy link

Having the same problem. Not sure why the dependencies are not downloading from jcenter.

@duncte123
Copy link

duncte123 commented Jan 29, 2019

I'm having the same issue with gradle 5.1.1 and gradle 4.10.3 on version 2.2.3 on java 11

@BreadMoirai
Copy link
Owner

As per stewartbryson's recommendation, I have updated 2.2.4 to use compile instead of implementation

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

5 participants