Skip to content

Commit

Permalink
Fail build if srgPath doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
LunNova committed Sep 7, 2016
1 parent 8e90a64 commit b5e43c9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@ ext.mappingsPath = homeDir + 'caches/minecraft/de/oceanlabs/mcp/mcp_' + mappings
ext.srgPath = mappingsPath + 'srgs/notch-srg.srg'

jar.doFirst {
if (!file(mappingsPath + 'fields.csv').exists() || !file(srgPath))
throw new Error("Can't find mappings at " + mappingsPath)
if (
!file(mappingsPath + 'fields.csv').exists() ||
!file(mappingsPath + 'methods.csv').exists() ||
!file('./generated/extendsMap.obj').exists() ||
!file(srgPath).exists()
)
throw new Error("Can't find mappings at $mappingsPath and/or $srgPath and/or extendsMap")
}

jar {
Expand Down

0 comments on commit b5e43c9

Please sign in to comment.