Skip to content

Commit f6dda5e

Browse files
committed
readme, build.gradle
1 parent 2722396 commit f6dda5e

File tree

2 files changed

+47
-10
lines changed

2 files changed

+47
-10
lines changed

README.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ Hide strings easily with that lib and plugin! It uses AES/ECB/PKCS5Padding trans
66
Gradle implementation
77
------------
88

9-
root_project/build.gradle
109
```groovy
10+
// root_project/build.gradle
11+
12+
apply plugin: com.efraespada.stringobfuscatorplugin.StringObfuscatorPlugin
13+
1114
buildscript {
1215
1316
ext {
14-
aso_sop_version = '0.4.1'
17+
aso_sop_version = '0.4.2'
1518
}
1619
1720
repositories {
@@ -23,12 +26,11 @@ buildscript {
2326
}
2427
2528
}
26-
27-
apply plugin: com.efraespada.stringobfuscatorplugin.StringObfuscatorPlugin
2829
```
2930

30-
root_project/app/build.gradle
3131
```groovy
32+
// root_project/your_module/build.gradle
33+
3234
repositories {
3335
jcenter()
3436
}
@@ -98,6 +100,43 @@ message += "\n\nFor Metal Gear lovers:\n\n\"Snake, the password is " +
98100

99101
<p align="center"><img width="40%" vspace="20" src="https://raw.githubusercontent.com/efraespada/AndroidStringObfuscator/master/sample.png"></p>
100102

103+
104+
Configuration
105+
-----------------------------
106+
By default the plugin will encrypt every `strings.xml` file inside `src/main`folder but you can choose a different configuration.
107+
```groovy
108+
// root_folder/build.gradle
109+
apply plugin: com.efraespada.stringobfuscatorplugin.StringObfuscatorPlugin
110+
111+
stringobfuscator {
112+
113+
modules {
114+
115+
sample {
116+
stringFiles = ['strings.xml',"other_file.xml"]
117+
srcFolders = ['src/main', "other_folder"]
118+
}
119+
120+
// root_folder/sample/src/main/res/.../strings.xml
121+
// root_folder/sample/src/main/res/.../other_file.xml
122+
// root_folder/other_folder/res/.../strings.xml
123+
// root_folder/other_folder/res/.../other_file.xml
124+
125+
other_module {
126+
srcFolders = ['src/moduleB']
127+
}
128+
129+
// root_folder/other_module/src/moduleB/res/.../strings.xml
130+
131+
other_module_ {} //
132+
133+
// root_folder/other_module_/src/main/res/.../strings.xml
134+
135+
}
136+
137+
}
138+
```
139+
101140
Gradle Console Output Example
102141
-----------------------------
103142
```

build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1+
apply plugin: com.efraespada.stringobfuscatorplugin.StringObfuscatorPlugin
32

43
buildscript {
54

@@ -37,12 +36,11 @@ task clean(type: Delete) {
3736
delete rootProject.buildDir
3837
}
3938

40-
apply plugin: com.efraespada.stringobfuscatorplugin.StringObfuscatorPlugin
41-
4239
stringobfuscator {
4340
modules {
4441
sample {
45-
accessKey = ['ppp']
42+
stringFiles = ['strings.xml',"other_file.xml"]
43+
srcFolders = ['src/main', "other_folder"]
4644
}
4745
}
4846
}

0 commit comments

Comments
 (0)