Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ jobs:
# TODO: Also print the checksums of other dependency JARs which Gradle has obtained from the
# Internet or the local system.
echo 'Checksums of fred JARs:' ; sha256sum ../fred/build/output/*
echo 'fred version:'
java -classpath '../fred/build/output/freenet.jar' 'freenet.node.Version'
if [ "${{matrix.WoT-builder}}" = "ant" ] ; then
ant clean && ant
elif [ "${{matrix.WoT-builder}}" = "gradle" ] ; then
Expand Down
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,21 @@ task compileDb4o(type: Exec) {
"-Djavac.target.version=" + targetCompatibility
}

task showFredVersion {
doLast {
URL[] classpath = sourceSets.main.runtimeClasspath.files.collect { it.toURL() } as URL[]
def cl = new URLClassLoader(classpath)
def cls = Class.forName("freenet.node.Version", true, cl)
def publicVersion = cls.getMethod("publicVersion").invoke(null)
def buildNumber = cls.getMethod("buildNumber").invoke(null)
def cvsRevision = cls.getMethod("cvsRevision").invoke(null)
println("Using Fred version " + publicVersion + " build #" + buildNumber + " (" + cvsRevision + ")")
}
}

compileJava {
dependsOn 'compileDb4o'
dependsOn 'showFredVersion'
}

task prepareVersionFile(type: Copy) {
Expand Down