fastlane-plugin-android_change_package_name 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43ce59dce49c76f68165fc371eae349b4836d09058e096914183568469cfc031
|
4
|
+
data.tar.gz: 5693e0cff94eb6f2faf2e7d56b89205b09729fce81c04c4e2db8e8b1c331e09e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1c44e937304d85e1c4c8ff3707018a1c69422aa5343ce7b2f06294805744652ba79759056b2adb3b816679a36e946a1411622db55b25b3162361fb4e6c1851a
|
7
|
+
data.tar.gz: 7e5c65060833792443cc722d9b642d0637ec5a20b3cafdcab6f7f08318dc145cec6e34e223d7f08b62987d27222e74ac96871083615aa58c8e7e53634399606f
|
data/lib/fastlane/plugin/android_change_package_name/actions/android_change_package_name_action.rb
CHANGED
@@ -23,22 +23,24 @@ module Fastlane
|
|
23
23
|
UI.message("Updating package name to: #{packageName}")
|
24
24
|
end
|
25
25
|
|
26
|
-
|
26
|
+
if originalPackageName != packageName
|
27
|
+
File.write(manifest, @doc.to_xml)
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
29
|
+
folder = originalPackageName.gsub('.', '/')
|
30
|
+
new_folder = packageName.gsub('.', '/')
|
31
|
+
new_folder_path = "#{path}/app/src/main/java/#{new_folder}"
|
31
32
|
|
32
|
-
|
33
|
+
FileUtils::mkdir_p new_folder_path
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
java_sources = Dir.glob("#{path}/app/src/main/java/#{folder}/*.java")
|
36
|
+
java_sources.each do |file|
|
37
|
+
FileUtils.mv file, new_folder_path
|
38
|
+
end
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
Bundler.with_clean_env do
|
41
|
+
sh "find #{path}/app/src -name '*.java' -type f -exec sed -i '' 's/#{originalPackageName}/#{packageName}/' {} \\;"
|
42
|
+
sh "find #{path}/app -name 'build.gradle' -type f -exec sed -i '' 's/#{originalPackageName}/#{packageName}/' {} \\;"
|
43
|
+
end
|
42
44
|
end
|
43
45
|
|
44
46
|
UI.message("#{originalPackageName} successfully updated to #{packageName}")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-android_change_package_name
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yeppao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|