@@ -19,11 +19,10 @@ class SCTest {
19
19
librarySetupTask.runCommand()
20
20
}
21
21
22
- /*
23
-
24
22
@Test
25
23
fun `01 - (PLUGIN) terminal verification` () {
26
24
" echo $extensionName " .runCommand { command, result ->
25
+ println (result)
27
26
assert (command.contains(result.normalize()))
28
27
}
29
28
}
@@ -32,6 +31,7 @@ class SCTest {
32
31
fun `02 - (PLUGIN) gradlew signingReport` () {
33
32
val temp = tempPath()
34
33
signingReportTask(temp).runCommand { _, report ->
34
+ println (report)
35
35
assert (report.contains(" SHA1" ) && report.contains(" BUILD SUCCESSFUL" ))
36
36
}
37
37
}
@@ -40,6 +40,7 @@ class SCTest {
40
40
fun `03 - (PLUGIN) fingerprint extraction` () {
41
41
val temp = tempPath()
42
42
signingReportTask(temp).runCommand { _, report ->
43
+ println (report)
43
44
assert (report.extractFingerprint().split(" :" ).size == 20 )
44
45
}
45
46
}
@@ -65,7 +66,8 @@ class SCTest {
65
66
@Test
66
67
fun `06 - (PLUGIN) restore string files` () {
67
68
val temp = tempPath()
68
- prepareTask(temp).runCommand { _, _ ->
69
+ prepareTask(temp).runCommand { _, report ->
70
+ println (report)
69
71
assert (
70
72
restoreFiles(" $temp${File .separator}$testProjectName " , defaultMainModule).isEmpty()
71
73
)
@@ -81,7 +83,8 @@ class SCTest {
81
83
@Test
82
84
fun `07 - (PLUGIN) xml parsing` () {
83
85
val temp = tempPath()
84
- prepareTask(temp).runCommand { _, _ ->
86
+ prepareTask(temp).runCommand { _, report ->
87
+ println (report)
85
88
val files = locateFiles(" $temp${File .separator}$testProjectName " , configuration)
86
89
files.forEach {
87
90
assert (parseXML(it.file).isNotEmpty())
@@ -93,7 +96,9 @@ class SCTest {
93
96
fun `08 - (PLUGIN) obfuscate string values` () {
94
97
val temp = tempPath()
95
98
signingReportTask(temp).runCommand { _, report ->
99
+ println (report)
96
100
val key = report.extractFingerprint()
101
+ println (key)
97
102
assert (key.isNotEmpty())
98
103
val files = locateFiles(" $temp${File .separator}$testProjectName " , configuration)
99
104
files.forEach { file ->
@@ -114,7 +119,9 @@ class SCTest {
114
119
fun `09 - (PLUGIN) obfuscate and reveal string values` () {
115
120
val temp = tempPath()
116
121
signingReportTask(temp).runCommand { _, report ->
122
+ println (report)
117
123
val key = report.extractFingerprint()
124
+ println (key)
118
125
assert (key.isNotEmpty())
119
126
val files = locateFiles(" $temp${File .separator}$testProjectName " , configuration)
120
127
files.forEach { file ->
@@ -149,6 +156,7 @@ class SCTest {
149
156
fun `10 - (PLUGIN) obfuscate xml` () {
150
157
val temp = tempPath()
151
158
signingReportTask(temp).runCommand { _, report ->
159
+ println (report)
152
160
val files = locateFiles(" $temp${File .separator}$testProjectName " , configuration)
153
161
files.forEach { file ->
154
162
val entities = parseXML(file.file)
@@ -167,6 +175,7 @@ class SCTest {
167
175
fun `11 - (PLUGIN) obfuscate, restore and compare xml values with originals` () {
168
176
val temp = tempPath()
169
177
signingReportTask(temp).runCommand { _, report ->
178
+ println (report)
170
179
val files = backupFiles(" $temp${File .separator}$testProjectName " , configuration)
171
180
assert (files.isNotEmpty())
172
181
files.forEach { file ->
@@ -211,6 +220,7 @@ class SCTest {
211
220
fun `12 - (ANDROID COMPILATION) obfuscate xml and build (not real workflow)` () {
212
221
val temp = tempPath()
213
222
signingReportTask(temp).runCommand { _, report ->
223
+ println (report)
214
224
val files = locateFiles(" $temp${File .separator}$testProjectName " , configuration)
215
225
files.forEach { file ->
216
226
val entities = parseXML(file.file)
@@ -237,6 +247,7 @@ class SCTest {
237
247
fun `13 - (PLUGIN COMPILATION) plugin with no test` () {
238
248
pluginBuildTask().runCommand { _, report ->
239
249
assert (report.contains(" BUILD SUCCESSFUL" ))
250
+ println (report)
240
251
}
241
252
}
242
253
@@ -250,28 +261,13 @@ class SCTest {
250
261
modifyForTest(temp, testProjectName)
251
262
buildTask(" $temp${File .separator}$testProjectName " ).runCommand { _, androidReport ->
252
263
assert (androidReport.contains(" BUILD SUCCESSFUL" ))
264
+ println (androidReport)
253
265
}
254
266
}
255
267
}
256
268
257
269
@Test
258
- fun `15 - (GRADLE TASK) basic task test`() {
259
- pluginBuildTask().runCommand { _, report ->
260
- assert(report.contains("BUILD SUCCESSFUL"))
261
- }
262
- val temp = tempPath()
263
- prepareTask(temp).runCommand { _, _ ->
264
- modifyForTest(temp, testProjectName)
265
- basicGradleTask("$temp${File.separator}$testProjectName").runCommand { _, androidReport ->
266
- assert(androidReport.contains("BUILD SUCCESSFUL"))
267
- assert(androidReport.contains(gradleTaskNameDoctor))
268
- }
269
-
270
- }
271
- }*/
272
-
273
- @Test
274
- fun `16 - (GRADLE TASK) basic task test` () {
270
+ fun `15 - (GRADLE TASK) stringcarePreview` () {
275
271
pluginBuildTask().runCommand { _, report ->
276
272
assert (report.contains(" BUILD SUCCESSFUL" ))
277
273
}
@@ -288,7 +284,7 @@ class SCTest {
288
284
}
289
285
290
286
@Test
291
- fun `17 - (GRADLE TASK) test obfuscate ` () {
287
+ fun `16 - (GRADLE TASK) stringcareTestObfuscate ` () {
292
288
pluginBuildTask().runCommand { _, report ->
293
289
assert (report.contains(" BUILD SUCCESSFUL" ))
294
290
}
0 commit comments