Skip to content

Commit cdacb4f

Browse files
committed
Fixes for Ghidra 12.0
1 parent 49957cb commit cdacb4f

5 files changed

Lines changed: 268 additions & 221 deletions

File tree

build.gradle

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ def DISTRIBUTION_DIR = file("dist")
3636
def PATH_IN_ZIP = "${project.name}"
3737

3838
def 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

4744
wrapper {
@@ -55,23 +52,24 @@ repositories {
5552

5653
configurations {
5754
localDeps
55+
implementation.extendsFrom localDeps
5856
}
5957

6058
dependencies {
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

6663
buildExtension {
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 "\nCreated " + baseName + "." + extension + " in " + destinationDir
120+
doLast {
121+
println "\nCreated " + 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

129127
jar {
130-
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
128+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
131129
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.9.1
1+
version=0.9.2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)