dryrun 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dryrun/android_project.rb +14 -5
- data/lib/dryrun/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a4e602a0ecb72cc5f99b1faea818f4878b016a244f5d5a41b1f30007ba4876
|
4
|
+
data.tar.gz: 2438ea1f188a047f7bda8f66e1fab3921d039238d0c33e922729fbf033be27e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ba477d9e8ea4a5a238f001abdd4dd8ebaaafb954a16aecb113aef3e58ebe7d36bb6cf9e7a343d10c5bda4ddcacf48d4b057c7594483060f326b973615ca4e82
|
7
|
+
data.tar.gz: 2f04666d5ec0014c8c062768b3e1f91ad4362e85231d1c440d59b0b0d104550fa480cf227e3a681ae83dd3c3e05db9dd6f248116a338115432ada73bcd117e47
|
@@ -14,6 +14,7 @@ module Dryrun
|
|
14
14
|
@base_path = @custom_app_path ? File.join(path, @custom_app_path) : path
|
15
15
|
@flavour = flavour
|
16
16
|
@device = device
|
17
|
+
@gradle_file_extension = gradle_file_extension
|
17
18
|
@settings_gradle_path = settings_gradle_file
|
18
19
|
@main_gradle_file = main_gradle_file
|
19
20
|
|
@@ -22,6 +23,14 @@ module Dryrun
|
|
22
23
|
@modules = find_modules
|
23
24
|
end
|
24
25
|
|
26
|
+
def gradle_file_extension
|
27
|
+
gradle_file = File.join(@base_path, 'settings.gradle.kts')
|
28
|
+
if (File.exist?(gradle_file))
|
29
|
+
return ".gradle.kts"
|
30
|
+
end
|
31
|
+
".gradle"
|
32
|
+
end
|
33
|
+
|
25
34
|
def check_custom_app_path
|
26
35
|
return unless @custom_app_path
|
27
36
|
|
@@ -49,7 +58,7 @@ module Dryrun
|
|
49
58
|
# Open temporary file
|
50
59
|
tmp = Tempfile.new('extract')
|
51
60
|
|
52
|
-
file = "#{@path_to_sample}/build
|
61
|
+
file = "#{@path_to_sample}/build#{@gradle_file_extension}"
|
53
62
|
|
54
63
|
# Write good lines to temporary file
|
55
64
|
File.open(file, 'r') do |f|
|
@@ -64,11 +73,11 @@ module Dryrun
|
|
64
73
|
end
|
65
74
|
|
66
75
|
def settings_gradle_file(path = @base_path)
|
67
|
-
File.join(path,
|
76
|
+
File.join(path, "settings#{@gradle_file_extension}")
|
68
77
|
end
|
69
78
|
|
70
79
|
def main_gradle_file(path = @base_path)
|
71
|
-
File.join(path,
|
80
|
+
File.join(path, "build#{@gradle_file_extension}")
|
72
81
|
end
|
73
82
|
|
74
83
|
def valid?(main_gradle_file = @main_gradle_file)
|
@@ -81,8 +90,8 @@ module Dryrun
|
|
81
90
|
|
82
91
|
content = File.open(@settings_gradle_path, 'rb').read
|
83
92
|
|
84
|
-
content = content.split(/\n/).delete_if { |x| x.start_with?("
|
85
|
-
modules = content.scan(/'([^']*)'/)
|
93
|
+
content = content.split(/\n/).delete_if { |x| !x.start_with?("include")}.join("\n")
|
94
|
+
modules = content.scan(/'([^']*)'/) + content.scan(/\"([^"]*)\"/)
|
86
95
|
|
87
96
|
modules.each {|replacement| replacement.first.tr!(':', '')}
|
88
97
|
end
|
data/lib/dryrun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryrun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cesar ferreira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|