Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the insertAutoGeneratedEnumMappings gradle task #145

Open
wants to merge 1 commit into
base: gen1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.