File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 9090 echo " > No agency file! (rds:$GTFS_RDS_VALUES_GEN_FILE |json:$AGENCY_JSON_FILE |bike:$BIKE_STATION_VALUES_FILE )"
9191 exit 1 # error
9292fi
93- echo " - type: '$TYPE '"
9493if [ -z " $TYPE " ]; then
9594 echo " > No type found for agency!"
9695 exit 1 # error
Original file line number Diff line number Diff line change @@ -439,6 +439,21 @@ def setupResValues(buildType, appId) {
439439
440440 buildType. resValue(" string" , " bike_station_authority" , " ${ appId} .bike" )
441441 buildType. resValue(" string" , " gtfs_rts_authority" , " ${ appId} .gtfs" ) // do not change to avoid breaking compat w/ old modules
442+
443+ def poiAgencyTypePrefix
444+ if (file(" src/main/res/values/gtfs_rts_values.xml" ). exists()) { // do not change to avoid breaking compat w/ old modules
445+ poiAgencyTypePrefix = " gtfs_rts" // do not change to avoid breaking compat w/ old modules
446+ } else if (file(" src/main/res/values/bike_station_values.xml" ). exists()) {
447+ poiAgencyTypePrefix = " bike_station"
448+ }
449+ if (poiAgencyTypePrefix) {
450+ buildType. resValue(" string" , " poi_agency_authority" , " @string/${ poiAgencyTypePrefix} _authority" )
451+ buildType. resValue(" string" , " poi_agency_color" , " @string/${ poiAgencyTypePrefix} _color" )
452+ buildType. resValue(" string" , " poi_agency_short_name" , " @string/${ poiAgencyTypePrefix} _short_name" )
453+ } else {
454+ println " > Unexpected POI agency type!"
455+ }
456+
442457 buildType. resValue(" string" , " gtfs_real_time_authority" , " ${ appId} .gtfs.realtime" )
443458
444459 buildType. resValue(" string" , " rss_authority" , " ${ appId} .news.rss" )
You can’t perform that action at this time.
0 commit comments