Changeset fd311c7


Ignore:
Timestamp:
Apr 21, 2019 10:31:45 PM (10 months ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
21504f15
Parents:
7c71ff1
Message:

Gradle: Fix getBuiltBy() to work when override.properties does not exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • build.gradle

    r7c71ff1 rfd311c7  
    3434
    3535String getBuiltBy() {
    36     def builtBy
    37     file("override.properties").readLines().findAll({ line ->
    38         line.contains("build.built-by")
    39     }).first().eachMatch('.*=(.*)', {
    40         builtBy = it[1]
    41     })
     36    def builtBy = ""
     37    def overrideProps = file("override.properties")
     38    if (overrideProps.exists()) {
     39        overrideProps.readLines().findAll({ line ->
     40            line.contains("build.built-by")
     41        }).first().eachMatch('.*=(.*)', {
     42            builtBy = it[1]
     43        })
     44    }
    4245    builtBy
    4346}
Note: See TracChangeset for help on using the changeset viewer.