Make preprocessors exclusive by default and add inclusive options

This was done since previously the POST processors were inclusive but the PRE processors were exclusive, which is confusing.
This commit is contained in:
James Seibel
2023-07-11 21:33:55 -05:00
parent c9c96ff2e8
commit 21f665c941
+14
View File
@@ -28,13 +28,27 @@ def writeBuildGradlePredefine(List<String> mcVers, int mcIndex) {
for (int i = 0; i < mcVers.size(); i++) {
String mcStr = mcVers[i].replace(".", "_")
if (mcIndex < i) {
// exclusive before
redefineList.add("PRE_MC_" + mcStr)
}
if (mcIndex <= i) {
// inclusive before
redefineList.add("PRE_AND_MC_" + mcStr)
}
if (mcIndex == i) {
// exact
redefineList.add("MC_" + mcStr)
}
if (mcIndex > i) {
// inclusive after
redefineList.add("POST_AND_MC_" + mcStr)
}
if (mcIndex >= i) {
// exclusive after
redefineList.add("POST_MC_" + mcStr)
}
}