Conversation
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.
NACK, per comments.
build.gradle
Outdated
@@ -1,10 +1,20 @@ | |||
apply plugin: 'groovy' | |||
apply plugin: 'java' |
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.
This line isn't necessary.
apply plugin: 'java' |
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.
Thanks, you're right. That's what I get for following examples too closely. I will remove it.
build.gradle
Outdated
sourceCompatibility = '1.7' | ||
targetCompatibility = '1.7' | ||
sourceCompatibility = '1.10' | ||
targetCompatibility = '1.10' |
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.
No need to do this. We're not using 1.10 syntax, and furthermore this plugin is Groovy-based, not Java based, so the whole thing is kind of irrelevant.
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.
My intention was for consistency with https://github.com/bisq-network/bisq/blob/master/build.gradle#L19.
But good point, I hadn't considered it is completely irrelevant. Perhaps I should just remove it?
|
||
jar.doLast { task -> | ||
ant.checksum file: task.archivePath | ||
println "md5=" + file("build/libs/gradle-witness.jar.MD5").text.trim() |
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'm producing a different checksum result locally than what you report at bisq-network/bisq#1901 in the commit comment on bisq-network/bisq@ee96822:
~/Work/bisq-network/gradle-witness[update-gradle-build]
$ git log -1 --oneline
a4a1b2d (HEAD -> update-gradle-build, devinbileck/update-gradle-build) Update source/target compatibility to 1.10
$ ./gradlew --version
------------------------------------------------------------
Gradle 4.10.2
------------------------------------------------------------
Build time: 2018-09-19 18:10:15 UTC
Revision: b4d8d5d170bb4ba516e88d7fe5647e2323d791dd
Kotlin DSL: 1.0-rc-6
Kotlin: 1.2.61
Groovy: 2.4.15
Ant: Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM: 10.0.2 ("Oracle Corporation" 10.0.2+13)
OS: Mac OS X 10.12.5 x86_64
$ ./gradlew clean build
> Task :compileGroovy
> Task :jar
md5=ae4796f320ef3200515183fa9d3f4759
BUILD SUCCESSFUL in 2s
4 actionable tasks: 4 executed
$ cat ./build/libs/gradle-witness.jar.MD5
ae4796f320ef3200515183fa9d3f4759
(your commit comment says you produce the md5 sum 237be11ebb7604afa5ff478ec33d1df5
)
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.
Argg! I will investigate further.
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.
It is due to different line endings in the witness.properties file. If I change it to LF (vs CRLF) I get the same result as you. Shall I add a .gitattributes
file to ensure consistent line endings and prevent issues like this in the future?
These are not necessary since this plugin is Groovy-based, not Java based.
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.
ACK. I can confirm I now get the same md5 sum when building the jar locally. Thanks, @devinbileck.
Resolves concerns discussed in bisq-network/bisq#1901 (comment)