mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-24 13:11:47 +00:00
GT-3017: Storing minimum gradle version in application.properties.
This commit is contained in:
parent
c80d84350b
commit
de68f50eb4
@ -13,7 +13,7 @@ You may not need all of these, depending on which portions you are building or d
|
||||
- https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html
|
||||
* Eclipse - It must support JDK 11. Eclipse 2018-12 or later should work. Other IDEs may work, but we have not tested them.
|
||||
- https://www.eclipse.org/downloads/
|
||||
* Gradle 5.0 - Later versions may work, but you'll need to modify our version check.
|
||||
* Gradle 5.0 or later - We use version 5.0, and tested with up to 5.5.1.
|
||||
- https://gradle.org/next-steps/?version=5.0&format=bin
|
||||
* A C/C++ compiler - We use GCC on Linux, Xcode (Clang) on macOS, and Visual Studio 2017 on Windows.
|
||||
- https://gcc.gnu.org/
|
||||
|
@ -53,9 +53,9 @@ public class ApplicationProperties extends Properties {
|
||||
public static final String APPLICATION_LAYOUT_VERSION_PROPERTY = "application.layout.version";
|
||||
|
||||
/**
|
||||
* The recommended version of gradle used to build the application.
|
||||
* The minimum version of gradle required to build the application.
|
||||
*/
|
||||
public static final String APPLICATION_GRADLE_VERSION_PROPERTY = "application.gradle.version";
|
||||
public static final String APPLICATION_GRADLE_MIN_PROPERTY = "application.gradle.min";
|
||||
|
||||
/**
|
||||
* The minimum major version of Java required to run the application. For example, "8".
|
||||
|
@ -2,7 +2,7 @@ application.name=Ghidra
|
||||
application.version=9.1
|
||||
application.release.name=DEV
|
||||
application.layout.version=1
|
||||
application.gradle.version=5.0
|
||||
application.gradle.min=5.0
|
||||
application.java.min=11
|
||||
application.java.max=
|
||||
application.java.compiler=11
|
||||
|
@ -149,7 +149,7 @@ public class ConfigureGradleWizardPage extends WizardPage {
|
||||
GhidraApplicationLayout ghidraLayout = new GhidraApplicationLayout(ghidraDir);
|
||||
ApplicationProperties props = ghidraLayout.getApplicationProperties();
|
||||
gradleVersion =
|
||||
props.getProperty(ApplicationProperties.APPLICATION_GRADLE_VERSION_PROPERTY);
|
||||
props.getProperty(ApplicationProperties.APPLICATION_GRADLE_MIN_PROPERTY);
|
||||
if (gradleVersion != null && !gradleVersion.isEmpty()) {
|
||||
setDescription("Configure Gradle. Version " + gradleVersion + " is expected.");
|
||||
}
|
||||
|
13
build.gradle
13
build.gradle
@ -2,17 +2,16 @@ apply plugin: 'eclipse'
|
||||
|
||||
apply from: 'gradle/root/eclipse.gradle'
|
||||
apply from: "gradle/support/eclipseLauncher.gradle"
|
||||
|
||||
apply from: "gradle/support/loadApplicationProperties.gradle"
|
||||
|
||||
|
||||
/***************************************************************************************
|
||||
* Make sure the correct version of gradle is being used
|
||||
***************************************************************************************/
|
||||
import org.gradle.util.GradleVersion;
|
||||
final GradleVersion minimum_version = GradleVersion.version('5.0')
|
||||
|
||||
final GradleVersion minimum_version = GradleVersion.version("${rootProject.GRADLE_MINIMUM_VERSION}")
|
||||
if (GradleVersion.current() < minimum_version) {
|
||||
throw new GradleException("Requires at least $minimum_version, but was ran with $gradle.gradleVersion")
|
||||
throw new GradleException("Requires at least $minimum_version, but was run with $gradle.gradleVersion")
|
||||
}
|
||||
|
||||
/***************************************************************************************
|
||||
@ -55,12 +54,6 @@ if (file("flatRepo").isDirectory()) {
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* load properties from Ghidra/application.properties file
|
||||
*********************************************************************************/
|
||||
|
||||
apply from: "gradle/support/loadApplicationProperties.gradle"
|
||||
|
||||
/****************************************************************************
|
||||
* Create a set containing all the platforms we need when building native
|
||||
* artifacts. This is here for convenience and can be used in a build file
|
||||
|
@ -12,6 +12,7 @@ file("Ghidra/application.properties").withReader { reader ->
|
||||
project.ext.RELEASE_VERSION = version
|
||||
project.ext.RELEASE_NAME = ghidraProps.getProperty('application.release.name')
|
||||
project.ext.JAVA_COMPILER = ghidraProps.getProperty('application.java.compiler')
|
||||
project.ext.GRADLE_MINIMUM_VERSION = ghidraProps.getProperty('application.gradle.min')
|
||||
project.ext.DISTRO_PREFIX = "ghidra_${version}_${RELEASE_NAME}"
|
||||
|
||||
// Build dates may or may not be already present in the application.properties file.
|
||||
|
Loading…
Reference in New Issue
Block a user