No issue: Add Digital Asset Links token for TWAs
This commit is contained in:
parent
106458c2c9
commit
fe8a8bfb0a
|
@ -81,6 +81,7 @@ gen-external-apklibs
|
|||
# Token files
|
||||
.leanplum_token
|
||||
.adjust_token
|
||||
.digital_asset_links_token
|
||||
|
||||
|
||||
# Python Byte-compiled / optimized / DLL files
|
||||
|
|
|
@ -315,6 +315,21 @@ android.applicationVariants.all { variant ->
|
|||
buildConfigField 'String', 'LEANPLUM_TOKEN', 'null'
|
||||
println("X_X")
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
// Digital Asset Links: Read token from local file if it exists
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
|
||||
print("Digital Asset Links token: ")
|
||||
|
||||
try {
|
||||
def token = new File("${rootDir}/.digital_asset_links_token").text.trim()
|
||||
buildConfigField 'String', 'DIGITAL_ASSET_LINKS_TOKEN', '"' + token + '"'
|
||||
println "(Added from .digital_asset_links_token file)"
|
||||
} catch (FileNotFoundException ignored) {
|
||||
buildConfigField 'String', 'DIGITAL_ASSET_LINKS_TOKEN', 'null'
|
||||
println("X_X")
|
||||
}
|
||||
}
|
||||
|
||||
androidExtensions {
|
||||
|
|
|
@ -61,6 +61,7 @@ class TaskBuilder(object):
|
|||
('sentry_dsn', '.sentry_token'),
|
||||
('leanplum', '.leanplum_token'),
|
||||
('adjust', '.adjust_token'),
|
||||
('digital_asset_links', '.digital_asset_links_token'),
|
||||
('firebase', 'app/src/{}/res/values/firebase.xml'.format(variant.build_type)),
|
||||
)
|
||||
)
|
||||
|
@ -106,6 +107,7 @@ class TaskBuilder(object):
|
|||
'echo "https://fake@sentry.prod.mozaws.net/368" > .sentry_token',
|
||||
'echo "--" > .adjust_token',
|
||||
'echo "-:-" > .leanplum_token',
|
||||
'touch .digital_asset_links_token',
|
||||
'./gradlew --no-daemon clean assemble{}'.format(variant.name),
|
||||
))
|
||||
|
||||
|
|
Loading…
Reference in New Issue