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: 454f329c02fdacdbffddb892255e3142e1271dc84cf78b412c44c515fd00ab58
4
- data.tar.gz: a8525226af2ccb74b6067fad1a8f4af3b45e49dab47a1249df229dd925545ead
3
+ metadata.gz: 43ce59dce49c76f68165fc371eae349b4836d09058e096914183568469cfc031
4
+ data.tar.gz: 5693e0cff94eb6f2faf2e7d56b89205b09729fce81c04c4e2db8e8b1c331e09e
5
5
  SHA512:
6
- metadata.gz: '09323bb43744fc2bed815c3f6a0db934def5f72cac2b538d3b812a92cd3a1144acdcaba22f1337a51280479d9a3134e96f5dc70d9abd656eb4e1ab7a223b4c6d'
7
- data.tar.gz: ab29331783c73c3010901356c1f1baa8726cb64466b8317f0b425643fedd9071fcd3cec398b4f2704f48356eb0e0ada0329475c9cfe2eeff65a57a930d6cf5c3
6
+ metadata.gz: c1c44e937304d85e1c4c8ff3707018a1c69422aa5343ce7b2f06294805744652ba79759056b2adb3b816679a36e946a1411622db55b25b3162361fb4e6c1851a
7
+ data.tar.gz: 7e5c65060833792443cc722d9b642d0637ec5a20b3cafdcab6f7f08318dc145cec6e34e223d7f08b62987d27222e74ac96871083615aa58c8e7e53634399606f
@@ -23,22 +23,24 @@ module Fastlane
23
23
  UI.message("Updating package name to: #{packageName}")
24
24
  end
25
25
 
26
- File.write(manifest, @doc.to_xml)
26
+ if originalPackageName != packageName
27
+ File.write(manifest, @doc.to_xml)
27
28
 
28
- folder = originalPackageName.gsub('.', '/')
29
- new_folder = packageName.gsub('.', '/')
30
- new_folder_path = "#{path}/app/src/main/java/#{new_folder}"
29
+ folder = originalPackageName.gsub('.', '/')
30
+ new_folder = packageName.gsub('.', '/')
31
+ new_folder_path = "#{path}/app/src/main/java/#{new_folder}"
31
32
 
32
- FileUtils::mkdir_p new_folder_path
33
+ FileUtils::mkdir_p new_folder_path
33
34
 
34
- java_sources = Dir.glob("#{path}/app/src/main/java/#{folder}/*.java")
35
- java_sources.each do |file|
36
- FileUtils.mv file, new_folder_path
37
- end
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
- Bundler.with_clean_env do
40
- sh "find #{path}/app/src -name '*.java' -type f -exec sed -i '' 's/#{originalPackageName}/#{packageName}/' {} \\;"
41
- sh "find #{path}/app -name 'build.gradle' -type f -exec sed -i '' 's/#{originalPackageName}/#{packageName}/' {} \\;"
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}")
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidChangePackageName
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
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.5
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-09-28 00:00:00.000000000 Z
11
+ date: 2018-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri