-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Versions and install firebase on sample app * Add firebase JSON resource * Android Sample updates * build-extras.gradle copy hook * change clobbers to merges to fix ordering issue * Add firebase google services to sample app Leave them commented for now ignored the actual files WIP: android seems not to be working * Add (commented) google play services to sample app for testing firebase Uncomment them to test after adding the google-services.json * Make local firebase work for both platforms * TealiumFirebase package.json spacing * Just leave the direct dependency to tealiumfirebase in tealium.gradle --------- Co-authored-by: jameskeith <[email protected]>
- Loading branch information
1 parent
aeb352a
commit 950108c
Showing
17 changed files
with
227 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ plugins/ | |
platforms/ | ||
.DS_STORE | ||
package-lock.json | ||
*GoogleService-Info.plist | ||
*google-services.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
android { | ||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 29 | ||
targetSdkVersion 34 | ||
} | ||
|
||
packagingOptions { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
android { | ||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 29 | ||
targetSdkVersion 34 | ||
} | ||
|
||
packagingOptions { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Manually set the Kotlin version | ||
if(cordovaConfig.IS_GRADLE_PLUGIN_KOTLIN_ENABLED) { | ||
android { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
|
||
module.exports = function () { | ||
const sourceFile = path.join('build-extras.gradle'); | ||
const destinationFile = path.join('platforms', 'android', 'app', 'build-extras.gradle'); | ||
|
||
if (fs.existsSync(sourceFile)) { | ||
fs.copyFile(sourceFile, destinationFile, (err) => { | ||
if (err) throw err; | ||
console.log('build-extras.gradle was copied.'); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const plugins = ['kotlin-android-extensions']; | ||
|
||
module.exports = function () { | ||
const file = path.join('platforms', 'android', 'app', 'build.gradle'); | ||
|
||
if (fs.existsSync(file)) { | ||
let newFile = fs.readFileSync(file).toString(); | ||
|
||
console.log('Removing lines from build.gradle... '); | ||
|
||
newFile = removeRegExp(newFile, plugins, applyPluginRegExp); | ||
|
||
fs.writeFileSync(file, newFile); | ||
} else { | ||
throw `Couldn't find file: ${file}`; | ||
} | ||
}; | ||
|
||
function removeRegExp(file, items, regExp) { | ||
const lines = []; | ||
|
||
for (const item of items) { | ||
lines.push(...Array.from(file.matchAll(regExp(item)))); | ||
} | ||
|
||
if (lines.length > 0) { | ||
lines.sort((a, b) => b.index - a.index); | ||
|
||
for (const line of lines) { | ||
console.log(`Removing line from build.gradle: ${line[0].trim()}`); | ||
|
||
file = file.slice(0, line.index) + file.slice(line.index + line[0].length); | ||
} | ||
} | ||
|
||
return file; | ||
} | ||
|
||
function applyPluginRegExp(plugin) { | ||
return new RegExp("\\s*?apply plugin: '" + plugin + "'.*?", 'gm'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
"config": { | ||
"firebase_analytics_enabled": "true", | ||
"firebase_session_timeout_seconds": "30", | ||
"firebase_log_level": "max", | ||
"firebase_session_minimum_seconds": "100" | ||
}, | ||
"mappings": { | ||
"achievement_id": "event.param_achievement_id", | ||
"ad_network_click_id": "event.param_ad_network_click_id", | ||
"affiliation": "event.param_affiliation", | ||
"campaign_keywords": "event.param_cp1", | ||
"campaign": "event.param_campaign", | ||
"game_character": "event.param_character", | ||
"checkout_option": "event.param_checkout_option", | ||
"checkout_step": "event.param_checkout_step", | ||
"content": "event.param_content", | ||
"content_type": "event.param_content_type", | ||
"coupon": "event.param_coupon", | ||
"creative_name": "event.param_creative_name", | ||
"creative_slot": "event.param_creative_slot", | ||
"currency_code": "event.param_currency", | ||
"travel_destination": "event.param_destination", | ||
"end_date": "event.param_end_date", | ||
"flight_number": "event.param_flight_number", | ||
"group_id": "event.param_group_id", | ||
"current_index": "param_index", | ||
"product_brand": "items.param_item_brand", | ||
"product_category": "items.param_item_category", | ||
"product_id": "items.param_item_id", | ||
"product_unit_price": "items.param_price", | ||
"product_quantity": "items.param_quantity", | ||
"product_list": "items.param_item_list", | ||
"product_location_id": "items.param_item_location_id", | ||
"product_name": "items.param_item_name", | ||
"product_variant": "items.param_item_variant", | ||
"current_level": "event.param_level", | ||
"most_recent_location": "event.param_location", | ||
"campaign_medium": "event.param_medium", | ||
"number_nights": "event.param_number_nights", | ||
"number_pax": "event.param_number_pax", | ||
"number_rooms": "event.param_number_rooms", | ||
"travel_origin": "event.param_origin", | ||
"score": "event.param_score", | ||
"search_keyword": "event.param_search_term", | ||
"order_shipping_amount": "event.param_shipping", | ||
"signup_method": "event.param_signup_method", | ||
"campaign_source": "event.param_source", | ||
"start_date": "event.param_start_date", | ||
"order_tax_amount": "event.param_tax", | ||
"product_term": "event.param_term", | ||
"order_id": "event.param_transaction_id", | ||
"travel_class": "event.param_travel_class", | ||
"order_total": "event.param_value", | ||
"currency_type": "event.param_virtual_currency_name", | ||
"user_signup_method": "event.param_user_signup_method", | ||
"tealium_event": "firebase_event_name", | ||
"screen_name": "firebase_screen_name", | ||
"screen_class": "firebase_screen_class", | ||
"customer_property": "firebase_property_name", | ||
"customer_value": "firebase_property_value", | ||
"customer_id": "firebase_user_id", | ||
"customparam1": "event.custom_param_1_mapped", | ||
"customparam2": "event.custom_param_2_mapped", | ||
"character": "event.character", | ||
"consent_ad_storage": "firebase_consent_settings.ad_storage", | ||
"consent_analytics_storage": "firebase_consent_settings.analytics_storage", | ||
"consent_ad_user_data": "firebase_consent_settings.ad_user_data", | ||
"consent_ad_personalization": "firebase_consent_settings.ad_personalization" | ||
}, | ||
"commands": { | ||
"launch": "config", | ||
"user_login": "logevent", | ||
"user_register": "logevent,setuserproperty", | ||
"share": "logevent", | ||
"show_offers": "logevent", | ||
"join_group": "logevent", | ||
"travel_order": "logevent", | ||
"earn_currency": "logevent", | ||
"spend_currency": "logevent", | ||
"unlock_achievement": "logevent", | ||
"level_up": "logevent", | ||
"start_tutorial": "logevent", | ||
"stop_tutorial": "logevent", | ||
"record_score": "logevent", | ||
"category": "logevent,setscreenname", | ||
"product": "logevent,setscreenname", | ||
"cart_add": "logevent", | ||
"wishlist_add": "logevent", | ||
"checkout": "logevent,setscreenname", | ||
"checkout_progress": "logevent", | ||
"email_signup": "logevent", | ||
"order": "logevent,setscreenname", | ||
"setconsent": "setconsent", | ||
"TestEvent": "logevent" | ||
} | ||
} |
Oops, something went wrong.