-
-
Notifications
You must be signed in to change notification settings - Fork 766
new gradle plugins block + fatJar #560
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
Conversation
* Adding support for the new gradle plugins block * Using the shadow plugin to create a fatJar for appium java client.
build.gradle
Outdated
| @@ -1,3 +1,8 @@ | |||
| plugins { | |||
| id "org.owasp.dependencycheck" version "1.4.5" | |||
| id "com.github.johnrengelman.shadow" version "1.2.4" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see shadow by default uses jfrog repo but we are publishing only to maven repo. Where are we specifying class path for owasp dependency check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying it using the plugins block makes it download the dependencies from plugins.gradle.org... Specifically here: https://plugins.gradle.org/plugin/org.owasp.dependencycheck
There is also an option of the longer buildscript{} if you wanted to get dependencies the old way..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it but does it set the classpath as well? Also as i said before we need to explicitly set the repository as maven repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I did some digging. Seems like gradle plugins block uses http://plugins.gradle.com/m2 which simply redirects all requests to jcenter.
~ curl -I https://plugins.gradle.org/m2/junit/junit/4.12/junit-4.12.pom
HTTP/1.1 303 See Other
Date: Fri, 27 Jan 2017 10:32:44 GMT
Content-Length: 0
Connection: keep-alive
Set-Cookie: __cfduid=dfb3ae2221aa16499509023673d8240ee1485513164; expires=Sat, 27-Jan-18 10:32:44 GMT; path=/; domain=.gradle.org; HttpOnly
Location: https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom
Via: 1.1 vegur
Server: cloudflare-nginx
CF-RAY: 327b8adfa92f0a00-ATL
Also, it seems that the gradle plugins website keeps the classpath mapping, as documented in their submission and reclaiming of groupIds docs.
https://plugins.gradle.org/docs/submit
https://plugins.gradle.org/docs/reclaiming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then as per your findings, we cannot accept this change since our main source of repository is maven central not jcenter. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also may i know where does shadow benefits users? What is your usecase behind it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shauvik Can you make necessary changes to point the repo back to maven central?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Had to add a jcenter dependency to buildscript, since shadow is only available there.
|
Heard a rant about having to download tons of jars while they were trying
to get appium java-client to run.
In their case, they were not using maven or gradle, and probably eclipse or
command line.
Selenium distributes a standalone version and also another version with a
zip tarball of all libs, which makes it super simple to get started.
shadow helps create such a fatJar easily. That's why i wanted to add it in
appium!
…On Fri, Jan 27, 2017 at 5:55 AM Srinivasan Sekar ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In build.gradle <#560>:
> @@ -1,3 +1,8 @@
+plugins {
+ id "org.owasp.dependencycheck" version "1.4.5"
+ id "com.github.johnrengelman.shadow" version "1.2.4"
Also may i know where does shadow benefits users? What is your usecase
behind it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#560>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIoKdcx-6UmUpXjX_Io2l1DIGdGJGQyks5rWc0OgaJpZM4LvbQe>
.
|
|
@shauvik Ok Thanks |
shadow is only on jcenter. So, need to add it to buildscript for satisfying dependency.
SrinivasanTarget
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shauvik Thanks
@TikhomirovSergey ping
To build fatJar, apply this PR patch and simply call
./gradlew shadowJarChange list
Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that applyDetails