Skip to content

Commit 2c95320

Browse files
committed
same version
1 parent 3227824 commit 2c95320

File tree

3 files changed

+37
-61
lines changed

3 files changed

+37
-61
lines changed

README.md

Lines changed: 27 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,38 @@ Android String Obfuscator
33

44
Hide strings easily with that lib (and script)! It uses AES/ECB/PKCS5Padding transformation to convert strings with your app's SHA1 fingerprint.
55

6-
Installation
6+
Gradle implementation
77
------------
88

9-
Put [AndroidStringObfuscator.jar](https://github.com/efraespada/AndroidStringObfuscator/raw/master/AndroidStringObfuscator.jar) in the root of the project.
10-
11-
#### Gradle
12-
139
root_project/build.gradle
1410
```groovy
15-
buildscript {
11+
buildscript {
12+
13+
ext {
14+
aso_sop_version = '0.4.1'
15+
}
16+
1617
repositories {
17-
mavenLocal()
18+
jcenter()
1819
}
20+
1921
dependencies {
20-
...
21-
classpath files('../AndroidObfuscatorPlugin/build/libs/stringobfuscatorplugin-1.0-SNAPSHOT.jar')
22-
...
22+
classpath "com.efraespada:stringobfuscatorplugin:$aso_sop_version"
2323
}
24+
2425
}
25-
26-
// BOTTOM
26+
2727
apply plugin: com.efraespada.stringobfuscatorplugin.StringObfuscatorPlugin
2828
```
2929

3030
root_project/app/build.gradle
3131
```groovy
3232
repositories {
3333
jcenter()
34-
}
35-
34+
}
35+
3636
dependencies {
37-
implementation project(path: ':androidstringobfuscator')
38-
// compile 'efraespada:androidstringobfuscator:0.4.1'
37+
implementation "efraespada:androidstringobfuscator:$aso_sop_version"
3938
}
4039
```
4140

@@ -103,37 +102,22 @@ Gradle Console Output Example
103102
-----------------------------
104103
```
105104
...
105+
:sample:generateDebugResValues UP-TO-DATE
106+
:sample:generateDebugResources UP-TO-DATE
106107
:sample:mergeDebugResources
107-
:sample:initStringObfuscator
108-
:sample:obfuscator-script - -----------------------------------------------------------------------------
109-
:sample:obfuscator-script - debug variant
110-
:sample:obfuscator-script - SHA1 fingerprint: E1:28:0C:3E:65:91:2E:21:E9:98:2B:58:80:9A:25:3A:F6:88:7D:FF
111-
:sample:obfuscator-script - [hello world!] - [D1862D9B434D08E..]
112-
:sample:obfuscator-script - -----------------------------------------------------------------------------
113-
:sample:obfuscator-script - v 0.7
114-
:sample:processDebugManifest UP-TO-DATE
115-
...
116-
```
117-
118-
119-
#### More information
120-
If you haven't installed Gradle before you compile:
121-
```
122-
...
123-
:sample:obfuscator-script - Downloading https://services.gradle.org/distributions/gradle-2.14.1-all.zip
124-
:sample:obfuscator-script - Unzipping /Users/efraespada/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1-all.zip to /Users/efraespada/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv
125-
:sample:obfuscator-script - Set executable permissions for: /Users/efraespada/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1/bin/gradle
108+
:sample:debug:B8:DC:47:58:9B:5F:2C:21:45:C4:04:37:0E:56:53:DC:24:6B:2C:66
109+
:sample:backupStringResources
110+
- values/strings.xml
111+
:sample:encryptStringResources
112+
- values/strings.xml
113+
[hello world!] - [A8590C43DA85D67..]
114+
:sample:mergeDebugResources UP-TO-DATE
115+
:sample:restoreStringResources
116+
- values/strings.xml
117+
:sample:createDebugCompatibleScreenManifests UP-TO-DATE
126118
...
127119
```
128120

129-
If `~/.android/debug.keystore` is missing, run your app to generate that file. For non default keystore file, check your project configuration.
130-
```
131-
...
132-
:sample:obfuscator-script - debug variant
133-
:sample:obfuscator-script - Missing keystore
134-
:sample:obfuscator-script - SHA1 fingerprint not detected; try params [module] [variant] [optional:sha1]
135-
...
136-
```
137121
License
138122
-------
139123
Copyright 2017 Efraín Espada

build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// Top-level build file where you can add configuration options common to all sub-projects/modules.
33

44
buildscript {
5+
6+
ext {
7+
aso_sop_version = '0.4.1'
8+
}
9+
510
repositories {
611
jcenter()
712
google()
@@ -10,8 +15,10 @@ buildscript {
1015
url "https://plugins.gradle.org/m2/"
1116
}
1217
}
18+
1319
dependencies {
14-
classpath files('../AndroidObfuscatorPlugin/build/libs/stringobfuscatorplugin-1.0-SNAPSHOT.jar')
20+
// classpath files('../StringObfuscatorPlugin/build/libs/stringobfuscatorplugin-0.4.1.jar')
21+
classpath "com.efraespada:stringobfuscatorplugin:$aso_sop_version"
1522
classpath 'com.android.tools.build:gradle:3.0.1'
1623
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1"
1724
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

sample/build.gradle

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,8 @@ dependencies {
3636
})
3737
implementation 'com.android.support:appcompat-v7:26.1.0'
3838
testImplementation 'junit:junit:4.12'
39-
implementation project(path: ':androidstringobfuscator')
40-
//compile 'efraespada:androidstringobfuscator:0.4.1'
41-
39+
// implementation project(path: ':androidstringobfuscator')
40+
implementation "efraespada:androidstringobfuscator:$aso_sop_version"
4241
}
4342

44-
/* string obfuscation
45-
android.applicationVariants.all{ variant ->
46-
variant.mergeResources.doLast{
47-
javaexec {
48-
main = "-jar";
49-
args = [
50-
"../obfuscator-script.jar",
51-
project.name,
52-
variant.dirName
53-
]
54-
}
55-
}
56-
}*/
57-
5843

0 commit comments

Comments
 (0)