@@ -36,12 +36,9 @@ def DISTRIBUTION_DIR = file("dist")
3636def PATH_IN_ZIP = " ${ project.name} "
3737
3838def getGitHash = {
39- def stdout = new ByteArrayOutputStream ()
40- exec {
39+ return providers. exec {
4140 commandLine ' git' , ' rev-parse' , ' --short' , ' HEAD'
42- standardOutput = stdout
43- }
44- return stdout. toString(). trim()
41+ }. standardOutput. asText. get(). trim()
4542}
4643
4744wrapper {
@@ -55,23 +52,24 @@ repositories {
5552
5653configurations {
5754 localDeps
55+ implementation. extendsFrom localDeps
5856}
5957
6058dependencies {
6159 implementation fileTree(dir : ghidraInstallDir + ' /Ghidra/Processors' , include : " **/*.jar" )
62- localDeps group : ' org.lz4' , name : ' lz4-java' , version : ' 1.5.1'
63- implementation configurations. localDeps
60+ localDeps ' org.lz4:lz4-java:1.5.1'
6461}
6562
6663buildExtension {
67- baseName " ${ project.name} -${ project.version} -${ getGitHash()} -Ghidra_${ ghidra_version} " . replace(' ' , ' _' )
68- extension ' zip'
69- destinationDir DISTRIBUTION_DIR
70- version ' '
64+ archiveBaseName. set(" ${ project.name} -${ project.version} -${ getGitHash()} -Ghidra_${ ghidra_version} " . replace(' ' , ' _' ))
65+ archiveExtension. set(' zip' )
66+ destinationDirectory. set(DISTRIBUTION_DIR )
67+
68+ archiveVersion. set(' ' )
7169
7270 // Make sure that we don't try to copy the same file with the same path into the
7371 // zip (this can happen!)
74- duplicatesStrategy ' exclude '
72+ duplicatesStrategy = DuplicatesStrategy . EXCLUDE
7573
7674 // This filtered property file copy must appear before the general
7775 // copy to ensure that it is prefered over the unmodified file
@@ -119,13 +117,13 @@ buildExtension {
119117 into PATH_IN_ZIP
120118 }
121119
122- doLast {
123- println " \n Created " + baseName + " ." + extension + " in " + destinationDir
120+ doLast {
121+ println " \n Created " + archiveBaseName . get() + " ." + archiveExtension . get() + " in " + destinationDirectory . get() . asFile
124122 }
125123}
126124
127- tasks. withType(Copy ). all { duplicatesStrategy ' exclude ' }
125+ tasks. withType(Copy ). all { duplicatesStrategy = DuplicatesStrategy . EXCLUDE }
128126
129127jar {
130- duplicatesStrategy( DuplicatesStrategy . EXCLUDE )
128+ duplicatesStrategy = DuplicatesStrategy . EXCLUDE
131129}
0 commit comments