Skip to content

Commit

Permalink
Show Java version that NCDbg was built with on boot
Browse files Browse the repository at this point in the history
  • Loading branch information
provegard committed Jun 21, 2018
1 parent 3605f32 commit c614645
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ task generateResources {
doLast {
mkdir generatedResourcesFolder
def buildProps = new File(generatedResourcesFolder, "build.properties")
buildProps.text = "version=$version"
def javaVer = org.gradle.internal.jvm.Jvm.current().javaVersion
buildProps.text = """version=$version
build_java_version=$javaVer
"""
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ object Boot extends App with Logging {
LogManager.getLogManager.reset()

log.info("NCDbg version: " + BuildProperties.version)
log.info("NCDbg built with Java version: " + BuildProperties.buildJavaVersion)
log.info("Local Java version: " + System.getProperty("java.version"))

val lazyBehavior = conf.isLazy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ object BuildProperties {
}

def version: String = Option(props.getProperty("version")).getOrElse("(unknown)")

def buildJavaVersion: String = Option(props.getProperty("build_java_version")).getOrElse("(unknown)")
}

0 comments on commit c614645

Please sign in to comment.