image-comparison icon indicating copy to clipboard operation
image-comparison copied to clipboard

[IMPROVEMENT] Move publishing via pom.xml

Open romankh3 opened this issue 4 years ago • 9 comments

** Describe your idea of the improvement ** Due to the reason, that GitHub supports pom.xml, but doesn't build.gradle, image-comparison must be moved to Maven and pom.xml

romankh3 avatar Dec 07 '19 18:12 romankh3

+1 for this one. Your Gradle projects don't even work on my machine without spending some time on StackOverflow trying to remember why this error happens (без танцев с бубном в общем).

Hexronimo avatar Jan 10 '20 08:01 Hexronimo

hi, @Hexronimo. I spent a few days researching how to publish to Maven Central and jCenter via bintray and didn't found the full solution. that's why it was moved to the backlog and I don't know where I would do it.

Please, describe your problem with Gradle. I merged a new Gradle version, maybe it relates to your problem.

and describe the solution, which helped you.

UPDATE: I cloned image-comparison, made ./gradlew command and all was as expected.

Best regards, Roman.

romankh3 avatar Jan 10 '20 08:01 romankh3

Yes, I believe it's related to Gradle version, I will check it in the evening. I'm not very familiar with the Gradle, because I use only Maven in my projects, so I'm not even sure that error is on your side, maybe it's in my workspace configuration. At least from what I see now, IntelliJ says "Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.". But I still can run it. Also, please fix two typos in your Example class in README.md (method name and ";a")

Hexronimo avatar Jan 10 '20 09:01 Hexronimo

Can you fix typos? As I can see, you've been forked image-comparison)

romankh3 avatar Jan 10 '20 09:01 romankh3

Ok, I'll do everything at the evening or if I'll have free time at work.

Hexronimo avatar Jan 10 '20 10:01 Hexronimo

thanks!

romankh3 avatar Jan 10 '20 10:01 romankh3

I'm trying to run and check it quickly, but got RuntimeException: Exception in thread "main" java.lang.IllegalArgumentException: -8 at java.base/java.util.stream.ReferencePipeline.skip(ReferencePipeline.java:476) at com.github.romankh3.image.comparison.ImageComparison.drawRectanglesOfDifferences(ImageComparison.java:358) (...)

UPD: Just commented imageComparison.setMaximalRectangleCount(10); and everything work now, so are you sure it should be in Example.class? Anyway, good thing is that everything is fine with Gradle and the project runs without any building errors from run.sh and from IDE too (but your project about movies still got this error on my system).

Hexronimo avatar Jan 10 '20 21:01 Hexronimo

Finally, I've got what are you talking about! This Example from README is shown how to use, not for running it...

Thanks for your catch. Please, create a bug issue to track it.

And I or even you can update this example to make it runnable.

Best regards, Roman.

romankh3 avatar Jan 11 '20 04:01 romankh3

Well, I understand that you want to show public methods and constructors in this Example.class (and I said that it's from readme in the comment above), but it actually can be used to copy-paste code and quickly see the result of this program work (I just commented unwanted constructors and renamed result.png to an actual path).

Hexronimo avatar Jan 11 '20 08:01 Hexronimo