Renaming the bundle and package Ids (#721)
* Renamed to com.mattermost.rnbeta * Fastlane for release of com.mattermost.rn * Do not Publish apps directly to production * Change ios icon format from jpeg to png
|
|
@ -46,13 +46,13 @@ android_library(
|
|||
|
||||
android_build_config(
|
||||
name = 'build_config',
|
||||
package = 'com.mattermost',
|
||||
package = 'com.mattermost.rnbeta',
|
||||
)
|
||||
|
||||
android_resource(
|
||||
name = 'res',
|
||||
res = 'src/main/res',
|
||||
package = 'com.mattermost',
|
||||
package = 'com.mattermost.rnbeta',
|
||||
)
|
||||
|
||||
android_binary(
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ android {
|
|||
buildToolsVersion "25.0.1"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.mattermost.react.native"
|
||||
applicationId "com.mattermost.rnbeta"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 23
|
||||
versionCode 39
|
||||
|
|
|
|||
|
|
@ -36,6 +36,68 @@
|
|||
"status": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:184930218130:android:c7debfa7ea3f75a7",
|
||||
"android_client_info": {
|
||||
"package_name": "com.mattermost.rnbeta"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "184930218130-8nahrspll1opff0uogtkh2qsv8coqngo.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyCkZkU2ECVg-mmdCG5OoHHQXtKiENuvWPE"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:184930218130:android:2db4058a5b5d6506",
|
||||
"android_client_info": {
|
||||
"package_name": "com.mattermost.rn"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "184930218130-8nahrspll1opff0uogtkh2qsv8coqngo.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyCkZkU2ECVg-mmdCG5OoHHQXtKiENuvWPE"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mattermost"
|
||||
package="com.mattermost.rnbeta"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.mattermost;
|
||||
package com.mattermost.rnbeta;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.mattermost;
|
||||
package com.mattermost.rnbeta;
|
||||
|
||||
import com.github.yamill.orientation.OrientationPackage;
|
||||
import com.psykar.cookiemanager.CookieManagerPackage;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.mattermost;
|
||||
package com.mattermost.rnbeta;
|
||||
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.mattermost;
|
||||
package com.mattermost.rnbeta;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<resources>
|
||||
|
||||
|
||||
<string name="app_name">Mattermost</string>
|
||||
<string name="app_name">Mattermost Beta</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ buildscript {
|
|||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.+'
|
||||
classpath 'com.google.gms:google-services:3.0.0'
|
||||
classpath 'com.google.gms:google-services:3.1.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
|
|||
|
|
@ -176,8 +176,16 @@ export default class Mattermost {
|
|||
};
|
||||
|
||||
onRegisterDevice = (data) => {
|
||||
const prefix = Platform.OS === 'ios' ? General.PUSH_NOTIFY_APPLE_REACT_NATIVE : General.PUSH_NOTIFY_ANDROID_REACT_NATIVE;
|
||||
const {dispatch, getState} = store;
|
||||
let prefix;
|
||||
if (Platform.OS === 'ios') {
|
||||
prefix = General.PUSH_NOTIFY_APPLE_REACT_NATIVE;
|
||||
if (DeviceInfo.getBundleId().includes('rnbeta')) {
|
||||
prefix = `${prefix}beta`;
|
||||
}
|
||||
} else {
|
||||
prefix = General.PUSH_NOTIFY_ANDROID_REACT_NATIVE;
|
||||
}
|
||||
setDeviceToken(`${prefix}:${data.token}`)(dispatch, getState);
|
||||
this.isConfigured = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
Platform,
|
||||
StatusBar,
|
||||
TouchableWithoutFeedback,
|
||||
View
|
||||
} from 'react-native';
|
||||
|
|
@ -21,7 +22,6 @@ import {Client, Client4} from 'mattermost-redux/client';
|
|||
|
||||
import ErrorText from 'app/components/error_text';
|
||||
import FormattedText from 'app/components/formatted_text';
|
||||
import StatusBar from 'app/components/status_bar';
|
||||
import TextInputWithLocalizedPlaceholder from 'app/components/text_input_with_localized_placeholder';
|
||||
import {GlobalStyles} from 'app/styles';
|
||||
import {isValidUrl, stripTrailingSlashes} from 'app/utils/url';
|
||||
|
|
@ -186,7 +186,7 @@ class SelectServer extends PureComponent {
|
|||
style={{flex: 1}}
|
||||
keyboardVerticalOffset={0}
|
||||
>
|
||||
<StatusBar/>
|
||||
<StatusBar barStyle='dark-content'/>
|
||||
<TouchableWithoutFeedback onPress={this.blur}>
|
||||
<View style={[GlobalStyles.container, GlobalStyles.signupContainer]}>
|
||||
<Image
|
||||
|
|
|
|||
BIN
assets/release/icons/android/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 458 KiB |
BIN
assets/release/icons/android/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 584 KiB |
BIN
assets/release/icons/android/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 589 KiB |
BIN
assets/release/icons/android/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 464 KiB |
BIN
assets/release/icons/android/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 598 KiB |
BIN
assets/release/icons/ios/20.png
Normal file
|
After Width: | Height: | Size: 582 KiB |
BIN
assets/release/icons/ios/20@2x-1.png
Normal file
|
After Width: | Height: | Size: 455 KiB |
BIN
assets/release/icons/ios/20@2x.png
Normal file
|
After Width: | Height: | Size: 455 KiB |
BIN
assets/release/icons/ios/20@3x.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/release/icons/ios/29.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
assets/release/icons/ios/29@2x-1.png
Normal file
|
After Width: | Height: | Size: 7 KiB |
BIN
assets/release/icons/ios/29@2x.png
Normal file
|
After Width: | Height: | Size: 7 KiB |
BIN
assets/release/icons/ios/29@3x.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/release/icons/ios/40.png
Normal file
|
After Width: | Height: | Size: 455 KiB |
BIN
assets/release/icons/ios/40@2x-1.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/release/icons/ios/40@2x.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/release/icons/ios/40@3x.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
assets/release/icons/ios/76.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
assets/release/icons/ios/76@2x.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
assets/release/icons/ios/83.5@2x.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/release/icons/ios/Icon-60.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/release/icons/ios/Icon-60@2x.png
Normal file
|
After Width: | Height: | Size: 462 KiB |
BIN
assets/release/icons/ios/Icon-60@3x.png
Normal file
|
After Width: | Height: | Size: 467 KiB |
BIN
assets/release/icons/ios/Icon-72.png
Normal file
|
After Width: | Height: | Size: 457 KiB |
BIN
assets/release/icons/ios/Icon-72@2x.png
Normal file
|
After Width: | Height: | Size: 462 KiB |
BIN
assets/release/icons/ios/Icon-Small-50.png
Normal file
|
After Width: | Height: | Size: 456 KiB |
BIN
assets/release/icons/ios/Icon-Small-50@2x.png
Normal file
|
After Width: | Height: | Size: 460 KiB |
BIN
assets/release/icons/ios/Icon.png
Normal file
|
After Width: | Height: | Size: 456 KiB |
BIN
assets/release/icons/ios/Icon@2x.png
Normal file
|
After Width: | Height: | Size: 460 KiB |
|
|
@ -3,7 +3,7 @@ skip_docs
|
|||
|
||||
platform :ios do
|
||||
before_all do |lane|
|
||||
if lane == :beta or lane == :release
|
||||
if lane == :beta
|
||||
ensure_git_branch(
|
||||
branch: 'master'
|
||||
)
|
||||
|
|
@ -12,7 +12,7 @@ platform :ios do
|
|||
end
|
||||
|
||||
after_all do |lane|
|
||||
if lane == :beta or lane == :release
|
||||
if lane == :beta
|
||||
reset_git_repo(
|
||||
force: true,
|
||||
skip_clean: true
|
||||
|
|
@ -26,7 +26,7 @@ platform :ios do
|
|||
desc 'Build Release file'
|
||||
desc 'This will also make sure the profile is up to date'
|
||||
lane :dev do
|
||||
match(type: 'adhoc')
|
||||
match(type: 'adhoc', app_identifier: 'com.mattermost.rnbeta')
|
||||
|
||||
build_ios({
|
||||
release: false,
|
||||
|
|
@ -39,7 +39,7 @@ platform :ios do
|
|||
desc 'Submit a new Beta Build to Apple TestFlight'
|
||||
desc 'This will also make sure the profile is up to date'
|
||||
lane :beta do
|
||||
match(type: 'appstore')
|
||||
match(type: 'appstore', app_identifier: 'com.mattermost.rnbeta')
|
||||
|
||||
build_ios({
|
||||
release: true,
|
||||
|
|
@ -83,40 +83,52 @@ platform :ios do
|
|||
|
||||
desc 'Deploy a new version to the App Store'
|
||||
lane :release do
|
||||
match(type: 'appstore')
|
||||
ensure_git_branch(
|
||||
branch: 'master'
|
||||
)
|
||||
|
||||
match(type: 'appstore', app_identifier: 'com.mattermost.rn')
|
||||
|
||||
# snapshot
|
||||
|
||||
update_app_identifier(
|
||||
xcodeproj: './ios/Mattermost.xcodeproj',
|
||||
plist_path: 'Mattermost/Info.plist',
|
||||
app_identifier: 'com.mattermost.rn'
|
||||
)
|
||||
update_info_plist(
|
||||
xcodeproj: './ios/Mattermost.xcodeproj',
|
||||
plist_path: 'Mattermost/Info.plist',
|
||||
display_name: 'Mattermost'
|
||||
)
|
||||
|
||||
sh 'cp -R ../assets/release/icons/ios/* ../ios/Mattermost/Images.xcassets/AppIcon.appiconset/'
|
||||
|
||||
build_ios({
|
||||
release: true,
|
||||
increment_build: true,
|
||||
ensure_git_status_clean: true,
|
||||
increment_build: false,
|
||||
ensure_git_status_clean: false,
|
||||
method: 'app-store'
|
||||
})
|
||||
|
||||
deliver(force: true)
|
||||
# deliver(
|
||||
# force: true,
|
||||
# skip_screenshots: true,
|
||||
# skip_metadata: true,
|
||||
# submit_for_review: false, #lets try this after the first release
|
||||
# automatic_release: false #lets try this after the first release
|
||||
# )
|
||||
|
||||
commit = last_git_commit
|
||||
|
||||
push_to_git_remote(
|
||||
remote: 'origin',
|
||||
local_branch: 'ios-release',
|
||||
force: false,
|
||||
tags: false
|
||||
)
|
||||
|
||||
unless ENV['GITHUB_TOKEN'].nil?
|
||||
create_pull_request(
|
||||
api_token: ENV['GITHUB_TOKEN'],
|
||||
repo: 'mattermost/mattermost-mobile',
|
||||
head: 'mattermost:ios-release',
|
||||
base: 'master',
|
||||
title: "IOS #{commit[:message]}"
|
||||
)
|
||||
end
|
||||
### We are going to publish the app to the testflight first and not deliver it directly to the app store
|
||||
pilot(skip_waiting_for_build_processing: true)
|
||||
|
||||
# frameit
|
||||
|
||||
reset_git_repo(
|
||||
force: true,
|
||||
skip_clean: true
|
||||
)
|
||||
|
||||
if ENV['MATTERMOST_WEBHOOK_URL']
|
||||
appstore_url = ENV['APPSTORE_URL']
|
||||
send_message_for_ios(
|
||||
|
|
@ -198,7 +210,7 @@ end
|
|||
|
||||
platform :android do
|
||||
before_all do |lane|
|
||||
if lane == :alpha or lane == :release
|
||||
if lane == :alpha
|
||||
ensure_git_branch(
|
||||
branch: 'master'
|
||||
)
|
||||
|
|
@ -207,7 +219,7 @@ platform :android do
|
|||
end
|
||||
|
||||
after_all do |lane|
|
||||
if lane == :alpha or lane == :release
|
||||
if lane == :alpha
|
||||
reset_git_repo(
|
||||
force: true,
|
||||
skip_clean: true
|
||||
|
|
@ -268,36 +280,78 @@ platform :android do
|
|||
|
||||
desc 'Deploy a new version to Google Play'
|
||||
lane :release do
|
||||
ensure_git_branch(
|
||||
branch: 'master'
|
||||
)
|
||||
android_change_package_identifier(newIdentifier: 'com.mattermost.rn', manifest: './android/app/src/main/AndroidManifest.xml')
|
||||
android_change_string_app_name(newName: 'Mattermost', stringsFile: './android/app/src/main/res/values/strings.xml')
|
||||
android_update_application_id(app_folder_name: 'android/app', application_id: 'com.mattermost.rn')
|
||||
|
||||
sh 'mv ../android/app/src/main/java/com/mattermost/rnbeta/ ../android/app/src/main/java/com/mattermost/rn/'
|
||||
sh 'cp -R ../assets/release/icons/android/* ../android/app/src/main/res/'
|
||||
|
||||
find_replace_string(
|
||||
path_to_file: './android/app/src/main/java/com/mattermost/rn/MainApplication.java',
|
||||
old_string: 'return BuildConfig.DEBUG;',
|
||||
new_string: 'return false;'
|
||||
)
|
||||
|
||||
|
||||
find_replace_string(
|
||||
path_to_file: './android/app/src/main/java/com/mattermost/rn/MainApplication.java',
|
||||
old_string: 'package com.mattermost.rnbeta;',
|
||||
new_string: 'package com.mattermost.rn;'
|
||||
)
|
||||
|
||||
find_replace_string(
|
||||
path_to_file: './android/app/src/main/java/com/mattermost/rn/CustomPushNotification.java',
|
||||
old_string: 'package com.mattermost.rnbeta;',
|
||||
new_string: 'package com.mattermost.rn;'
|
||||
)
|
||||
|
||||
find_replace_string(
|
||||
path_to_file: './android/app/src/main/java/com/mattermost/rn/MainActivity.java',
|
||||
old_string: 'package com.mattermost.rnbeta;',
|
||||
new_string: 'package com.mattermost.rn;'
|
||||
)
|
||||
|
||||
find_replace_string(
|
||||
path_to_file: './android/app/src/main/java/com/mattermost/rn/NotificationsLifecycleFacade.java',
|
||||
old_string: 'package com.mattermost.rnbeta;',
|
||||
new_string: 'package com.mattermost.rn;'
|
||||
)
|
||||
|
||||
find_replace_string(
|
||||
path_to_file: './android/app/BUCK',
|
||||
old_string: 'package com.mattermost.rnbeta;',
|
||||
new_string: 'package com.mattermost.rn;'
|
||||
)
|
||||
|
||||
build_android({
|
||||
release: true,
|
||||
increment_build: true,
|
||||
ensure_git_status_clean: true
|
||||
increment_build: false,
|
||||
ensure_git_status_clean: false
|
||||
})
|
||||
|
||||
# supply(
|
||||
# track: "production",
|
||||
# apk: "#{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}",
|
||||
# )
|
||||
|
||||
# We are going to upload the build to the beta lane and not directly to production so it can be promoted later
|
||||
supply(
|
||||
track: "production",
|
||||
track: 'beta',
|
||||
apk: "#{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}",
|
||||
)
|
||||
|
||||
commit = last_git_commit
|
||||
|
||||
push_to_git_remote(
|
||||
remote: 'origin',
|
||||
local_branch: 'android-release',
|
||||
force: false,
|
||||
tags: false
|
||||
sh 'mv ../android/app/src/main/java/com/mattermost/rn/ ../android/app/src/main/java/com/mattermost/rnbeta/'
|
||||
|
||||
reset_git_repo(
|
||||
force: true,
|
||||
skip_clean: true
|
||||
)
|
||||
|
||||
unless ENV['GITHUB_TOKEN'].nil?
|
||||
create_pull_request(
|
||||
api_token: ENV['GITHUB_TOKEN'],
|
||||
repo: 'mattermost/mattermost-mobile',
|
||||
head: 'mattermost:android-release',
|
||||
base: 'master',
|
||||
title: "Android #{commit[:message]}"
|
||||
)
|
||||
end
|
||||
|
||||
if ENV['MATTERMOST_WEBHOOK_URL']
|
||||
google_play_url = ENV['GOOGLE_PLAY_URL']
|
||||
send_message_for_android(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem "fastlane"
|
||||
gem "nokogiri"
|
||||
|
||||
plugins_path = File.join(File.dirname(__FILE__), '.', 'Pluginfile')
|
||||
eval(File.read(plugins_path), binding) if File.exist?(plugins_path)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ GEM
|
|||
xcodeproj (>= 1.4.4, < 2.0.0)
|
||||
xcpretty (>= 0.2.4, < 1.0.0)
|
||||
xcpretty-travis-formatter (>= 0.0.3)
|
||||
fastlane-plugin-android_change_package_identifier (0.1.0)
|
||||
fastlane-plugin-android_change_string_app_name (0.1.1)
|
||||
nokogiri
|
||||
fastlane-plugin-find_replace_string (0.1.0)
|
||||
gh_inspector (1.0.3)
|
||||
google-api-client (0.12.0)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
|
|
@ -87,10 +91,13 @@ GEM
|
|||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2016.0521)
|
||||
mini_magick (4.5.1)
|
||||
mini_portile (0.6.2)
|
||||
multi_json (1.12.1)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.0.0)
|
||||
nanaimo (0.2.3)
|
||||
nokogiri (1.6.6.2)
|
||||
mini_portile (~> 0.6.0)
|
||||
os (0.9.6)
|
||||
plist (3.3.0)
|
||||
public_suffix (2.0.5)
|
||||
|
|
@ -133,6 +140,10 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
fastlane
|
||||
fastlane-plugin-android_change_package_identifier
|
||||
fastlane-plugin-android_change_string_app_name
|
||||
fastlane-plugin-find_replace_string
|
||||
nokogiri
|
||||
|
||||
BUNDLED WITH
|
||||
1.13.7
|
||||
|
|
|
|||
|
|
@ -2,3 +2,6 @@
|
|||
#
|
||||
# Ensure this file is checked in to source control!
|
||||
|
||||
gem 'fastlane-plugin-android_change_package_identifier'
|
||||
gem 'fastlane-plugin-android_change_string_app_name'
|
||||
gem 'fastlane-plugin-find_replace_string'
|
||||
|
|
|
|||
110
fastlane/actions/android_update_application_id.rb
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
# rubocop:disable Style/CaseEquality
|
||||
# rubocop:disable Style/MultilineTernaryOperator
|
||||
# rubocop:disable Style/NestedTernaryOperator
|
||||
|
||||
require 'tempfile'
|
||||
require 'fileutils'
|
||||
|
||||
module Fastlane
|
||||
module Actions
|
||||
class AndroidUpdateApplicationIdAction < Action
|
||||
def self.run(params)
|
||||
app_folder_name ||= params[:app_folder_name]
|
||||
UI.message("The update_application_id plugin is looking inside your project folder (#{app_folder_name})!")
|
||||
|
||||
new_application_id ||= params[:application_id]
|
||||
UI.message("new applicationId = #{new_application_id}")
|
||||
|
||||
temp_file = Tempfile.new('fastlaneUpdateApplicationId')
|
||||
foundApplicationId = "false"
|
||||
Dir.glob("#{app_folder_name}/build.gradle") do |path|
|
||||
UI.message(" -> Found a build.gradle file at path: (#{path})!")
|
||||
begin
|
||||
temp_file = Tempfile.new('fastlaneUpdateApplicationId')
|
||||
File.open(path, 'r') do |file|
|
||||
file.each_line do |line|
|
||||
if line.include? "applicationId " and foundApplicationId=="false"
|
||||
|
||||
applicationComponents = line.strip.split(' ')
|
||||
application_id = applicationComponents[1].tr("\"","")
|
||||
line.replace line.sub(application_id, new_application_id.to_s)
|
||||
foundApplicationId = "true"
|
||||
temp_file.puts line
|
||||
else
|
||||
temp_file.puts line
|
||||
end
|
||||
end
|
||||
|
||||
if foundApplicationId=="true"
|
||||
break
|
||||
end
|
||||
file.close
|
||||
end
|
||||
temp_file.rewind
|
||||
temp_file.close
|
||||
FileUtils.mv(temp_file.path, path)
|
||||
temp_file.unlink
|
||||
ensure
|
||||
if foundApplicationId=="true"
|
||||
|
||||
break
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if new_application_id.empty?
|
||||
UI.user_error!("Impossible to update the applicationId in the current project folder #{app_folder_name} 😭")
|
||||
else
|
||||
# Store the version name in the shared hash
|
||||
Actions.lane_context["ANDROID_APPLICATION_ID"]=new_application_id
|
||||
UI.success("☝️ application_id has been changed to #{new_application_id}")
|
||||
end
|
||||
|
||||
return new_application_id
|
||||
end
|
||||
|
||||
def self.description
|
||||
"Update the applicationId of your android project."
|
||||
end
|
||||
|
||||
def self.authors
|
||||
["Elias Nahum"]
|
||||
end
|
||||
|
||||
def self.available_options
|
||||
[
|
||||
FastlaneCore::ConfigItem.new(key: :app_folder_name,
|
||||
env_name: "APPLICATIONID_APP_FOLDER_NAME",
|
||||
description: "The name of the application source folder in the Android project (default: app)",
|
||||
optional: true,
|
||||
type: String,
|
||||
default_value:"app"),
|
||||
FastlaneCore::ConfigItem.new(key: :application_id,
|
||||
env_name: "APPLICATIONID_VALUE",
|
||||
description: "Change to a specific applicationId",
|
||||
optional: false,
|
||||
type: String,
|
||||
default_value: '')
|
||||
]
|
||||
end
|
||||
|
||||
def self.output
|
||||
[
|
||||
['ANDROID_APPLICATION_ID', 'The new applicationId of the project']
|
||||
]
|
||||
end
|
||||
|
||||
def self.is_supported?(platform)
|
||||
[:android].include?(platform)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
# rubocop:enable Style/CaseEquality
|
||||
# rubocop:enable Style/MultilineTernaryOperator
|
||||
# rubocop:enable Style/NestedTernaryOperator
|
||||
|
|
@ -1338,7 +1338,7 @@
|
|||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mattermost.react.native;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mattermost.rnbeta;
|
||||
PRODUCT_NAME = Mattermost;
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
@ -1371,7 +1371,7 @@
|
|||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mattermost.react.native;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mattermost.rnbeta;
|
||||
PRODUCT_NAME = Mattermost;
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
|
|||
|
|
@ -1,94 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>39</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Take a Photo or Video and upload it to your mattermost instance</string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string/>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Upload Photos and Videos to your Mattermost instance</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>Entypo.ttf</string>
|
||||
<string>EvilIcons.ttf</string>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
<string>MaterialIcons.ttf</string>
|
||||
<string>Octicons.ttf</string>
|
||||
<string>Zocial.ttf</string>
|
||||
<string>Entypo.ttf</string>
|
||||
<string>EvilIcons.ttf</string>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
<string>MaterialCommunityIcons.ttf</string>
|
||||
<string>MaterialIcons.ttf</string>
|
||||
<string>Octicons.ttf</string>
|
||||
<string>SimpleLineIcons.ttf</string>
|
||||
<string>Zocial.ttf</string>
|
||||
<string>OpenSans-Bold.ttf</string>
|
||||
<string>OpenSans-BoldItalic.ttf</string>
|
||||
<string>OpenSans-ExtraBold.ttf</string>
|
||||
<string>OpenSans-ExtraBoldItalic.ttf</string>
|
||||
<string>OpenSans-Italic.ttf</string>
|
||||
<string>OpenSans-Light.ttf</string>
|
||||
<string>OpenSans-LightItalic.ttf</string>
|
||||
<string>OpenSans-Regular.ttf</string>
|
||||
<string>OpenSans-Semibold.ttf</string>
|
||||
<string>OpenSans-SemiboldItalic.ttf</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Mattermost Beta</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>39</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Take a Photo or Video and upload it to your mattermost instance</string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Upload Photos and Videos to your Mattermost instance</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>Entypo.ttf</string>
|
||||
<string>EvilIcons.ttf</string>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
<string>MaterialIcons.ttf</string>
|
||||
<string>Octicons.ttf</string>
|
||||
<string>Zocial.ttf</string>
|
||||
<string>Entypo.ttf</string>
|
||||
<string>EvilIcons.ttf</string>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
<string>MaterialCommunityIcons.ttf</string>
|
||||
<string>MaterialIcons.ttf</string>
|
||||
<string>Octicons.ttf</string>
|
||||
<string>SimpleLineIcons.ttf</string>
|
||||
<string>Zocial.ttf</string>
|
||||
<string>OpenSans-Bold.ttf</string>
|
||||
<string>OpenSans-BoldItalic.ttf</string>
|
||||
<string>OpenSans-ExtraBold.ttf</string>
|
||||
<string>OpenSans-ExtraBoldItalic.ttf</string>
|
||||
<string>OpenSans-Italic.ttf</string>
|
||||
<string>OpenSans-Light.ttf</string>
|
||||
<string>OpenSans-LightItalic.ttf</string>
|
||||
<string>OpenSans-Regular.ttf</string>
|
||||
<string>OpenSans-Semibold.ttf</string>
|
||||
<string>OpenSans-SemiboldItalic.ttf</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||