Skip to content

Commit

Permalink
Wrapping local.properties file access with a try-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico committed Jul 14, 2018
1 parent 852f340 commit a661560
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion myonnaise/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ artifacts {
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
try {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
} catch (ignored) {
logger.warn('File `local.properties`, not found!. If you\'re running on a CI you can ignore this warning.')
}
version = libVersion
group = libGroup

Expand Down

0 comments on commit a661560

Please sign in to comment.