fastlane-plugin-android_change_package_name 0.1.6 → 0.1.8
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: 393a80bf58442e474ae3fe2e30572a3488c7b52bc1a7a7ab4bf5538214b0ee09
|
4
|
+
data.tar.gz: 27839d5bc6dd6117033f36101bbb0e83d00b3765fc3adea3dbd0a1848912e65f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c249558c6be5e5dbc729e533eb642e67f653b8db2e8e1928d36dfe925a4adda104978cff207a5b2c05ceb012815c5ac26489866cb5d577ede789a9a6292bac3
|
7
|
+
data.tar.gz: 2da7caa00ade2ef41b550174dce2839ad21f1aaeebb7de4039823a237c0e3d2727507b1030a8594b2db0289c4b655ef30d597c9baca5f6ff42b78d70d7123094
|
data/lib/fastlane/plugin/android_change_package_name/actions/android_change_package_name_action.rb
CHANGED
@@ -23,23 +23,33 @@ module Fastlane
|
|
23
23
|
UI.message("Updating package name to: #{packageName}")
|
24
24
|
end
|
25
25
|
|
26
|
-
if
|
26
|
+
if originalPackageName != packageName
|
27
27
|
File.write(manifest, @doc.to_xml)
|
28
28
|
|
29
29
|
folder = originalPackageName.gsub('.', '/')
|
30
30
|
new_folder = packageName.gsub('.', '/')
|
31
|
-
|
32
|
-
|
31
|
+
|
32
|
+
if File.exist?("#{path}/app/src/main/java/#{folder}")
|
33
|
+
sourcesPath = "/app/src"
|
34
|
+
gradlePath = "/app"
|
35
|
+
new_folder_path = "#{path}#{sourcesPath}/main/java/#{new_folder}"
|
36
|
+
java_sources = Dir.glob("#{path}#{sourcesPath}/main/java/#{folder}/*.java")
|
37
|
+
elsif File.exist?("#{path}/src/#{folder}")
|
38
|
+
sourcesPath = "/src"
|
39
|
+
gradlePath "/."
|
40
|
+
new_folder_path = "#{path}#{sourcesPath}/#{new_folder}"
|
41
|
+
java_sources = Dir.glob("#{path}#{sourcesPath}/#{folder}/*.java")
|
42
|
+
end
|
43
|
+
|
33
44
|
FileUtils::mkdir_p new_folder_path
|
34
|
-
|
35
|
-
java_sources = Dir.glob("#{path}/app/src/main/java/#{folder}/*.java")
|
45
|
+
|
36
46
|
java_sources.each do |file|
|
37
47
|
FileUtils.mv file, new_folder_path
|
38
48
|
end
|
39
49
|
|
40
50
|
Bundler.with_clean_env do
|
41
|
-
sh "find #{path}
|
42
|
-
sh "find #{path}
|
51
|
+
sh "find #{path}#{sourcesPath} -name '*.java' -type f -exec sed -i '' 's/#{originalPackageName}/#{packageName}/' {} \\;"
|
52
|
+
sh "find #{path}#{gradlePath} -name 'build.gradle' -type f -exec sed -i '' 's/#{originalPackageName}/#{packageName}/' {} \\;"
|
43
53
|
end
|
44
54
|
end
|
45
55
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yeppao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|