Skip to content

Commit

Permalink
Remove the insertAutoGeneratedEnumMappings gradle task
Browse files Browse the repository at this point in the history
We remove this task in order to further simplify the gradle
buildscript.

Affected by this change are some enum field names, those that aren't in
the mappings already.
  • Loading branch information
zeichenreihe committed Nov 3, 2023
1 parent a2a202d commit 6539398
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
28 changes: 4 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1069,27 +1069,6 @@ task mapNamedJar(dependsOn: ["mergeV2", mapCalamusJar]) {
}
}

task insertAutoGeneratedEnumMappings(dependsOn: [buildFeatherTiny, mapCalamusJar], type: FileOutput) {
group = buildMappingGroup
def noEnumV2 = buildFeatherTiny.v2Output
output = new File(tempDir, "unmerged-named-v2-with-enum.tiny")

outputs.upToDateWhen { false }

doLast {
logger.lifecycle(":seeking auto-mappable fields for unmerged mappings")

String[] argsProposeV2 = [
calamusJar.getAbsolutePath(), // must use calamus jar
noEnumV2.getAbsolutePath(),
output.getAbsolutePath(),
"false" // don't replace existing names right now
]

new CommandProposeV2FieldNames().run(argsProposeV2)
}
}

task mergeV2(dependsOn: ["v2UnmergedFeatherJar", "invertCalamusV2"], type: FileOutput) {
def mergedV2 = new File(tempDir, "merged-v2.tiny")

Expand All @@ -1100,7 +1079,8 @@ task mergeV2(dependsOn: ["v2UnmergedFeatherJar", "invertCalamusV2"], type: FileO
logger.lifecycle(":merging feather and calamus v2")
String[] args = [
invertCalamusV2.output.getAbsolutePath(),
insertAutoGeneratedEnumMappings.output.getAbsolutePath(),
// we can use this, since v2UnmergedFeatherJar depends on buildFeatherTiny
buildFeatherTiny.v2Output.getAbsolutePath(),
mergedV2.getAbsolutePath(),
namespace,
"official"
Expand All @@ -1120,8 +1100,8 @@ task mergeV2(dependsOn: ["v2UnmergedFeatherJar", "invertCalamusV2"], type: FileO
}
}

task v2UnmergedFeatherJar(dependsOn: insertAutoGeneratedEnumMappings, type: Jar) {
def mappings = insertAutoGeneratedEnumMappings.output
task v2UnmergedFeatherJar(dependsOn: buildFeatherTiny, type: Jar) {
def mappings = buildFeatherTiny.v2Output
group = "mapping build"
outputs.upToDateWhen { false }
archiveFileName = "feather-${featherVersion}-v2.jar"
Expand Down
4 changes: 1 addition & 3 deletions tasks.dot
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,11 @@ digraph G {
}
//*/

insertAutoGeneratedEnumMappings[color = lightblue];
buildFeatherTiny, mapCalamusJar -> insertAutoGeneratedEnumMappings;
buildFeatherTiny -> v2UnmergedFeatherJar;

downloadVersionsManifest[color = lightblue, shape = rect];

v2UnmergedFeatherJar[color = lightblue];
insertAutoGeneratedEnumMappings -> v2UnmergedFeatherJar;

v2MergedFeatherJar[color = lightblue];
mergeV2 -> v2MergedFeatherJar;
Expand Down
Binary file modified tasks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6539398

Please sign in to comment.