Skip to content

Commit

Permalink
null check doesn't work unless it is possible to return null
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Nov 10, 2024
1 parent 280652e commit ab7ad73
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,12 @@ BINTRAY_KEY=key
} catch (Exception e) {
directory = project.sourceSets.main.output.classesDirs
}
[source : "${directory}/META-INF/grails-plugin.xml".toString(),
classifier: getDefaultClassifier(),
extension : 'xml']
String pluginXml = "${directory}/META-INF/grails-plugin.xml".toString()
new File(pluginXml).exists()? [
source : pluginXml,
classifier: getDefaultClassifier(),
extension : 'xml'
] : null
}

protected String getDefaultClassifier() {
Expand Down

0 comments on commit ab7ad73

Please sign in to comment.