Skip to content

Commit b3ae4a6

Browse files
authored
Merge pull request #45 from StringCare/develop
Develop
2 parents 3022bde + 6bbf576 commit b3ae4a6

File tree

10 files changed

+32
-27
lines changed

10 files changed

+32
-27
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1+
[![version][badge]][link]
2+
13
<p align="center"><img width="10%" vspace="10" src="https://github.com/StringCare/AndroidLibrary/raw/develop/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png"></p>
24

35
<h3 align="center" style="margin-bottom:30px" vspace="20">StringCare Android Library</h3>
46

57
<p align="center"><img width="10%" vspace="20" src="https://github.com/StringCare/AndroidLibrary/raw/develop/white.png"></p>
68

7-
#### [Wiki Library](https://github.com/StringCare/AndroidLibrary/wiki)
9+
#### [What Is StringCare](https://github.com/StringCare/AndroidLibrary/wiki/What-is-StringCare)
810

9-
#### [What is StringCare](https://github.com/StringCare/AndroidLibrary/wiki/What-is-StringCare)
11+
#### [Implementation](https://github.com/StringCare/AndroidLibrary/wiki/Implementation)
1012

11-
#### [Library Implementation](https://github.com/StringCare/AndroidLibrary/wiki/Library-Implementation)
13+
#### [Usage](https://github.com/StringCare/AndroidLibrary/wiki/Usage)
1214

13-
#### [Library Usage](https://github.com/StringCare/AndroidLibrary/wiki/Library-Usage)
15+
#### [Configuration](https://github.com/StringCare/AndroidLibrary/wiki/Configuration)
1416

1517
#### [Publish APK](https://github.com/StringCare/AndroidLibrary/wiki/Publish-APK)
1618

1719
#### [Limitations](https://github.com/StringCare/AndroidLibrary/wiki/Limitations)
1820

19-
#### [Migrate From 0.x To 1.x](https://github.com/StringCare/AndroidLibrary/wiki/Migrate-From-0.x-To-1.x)
21+
#### [Compatibility](https://github.com/StringCare/AndroidLibrary/wiki/Compatibility)
2022

21-
#### [Compatibility](https://github.com/StringCare/GradlePlugin/wiki/Compatibility)
23+
#### [Migrate From 0.x To 1.x](https://github.com/StringCare/AndroidLibrary/wiki/Migrate-From-0.x-To-1.x)
2224

23-
#### [Wiki Plugin](https://github.com/StringCare/GradlePlugin/wiki)
25+
[link]: https://github.com/StringCare/AndroidLibrary
26+
[badge]: https://img.shields.io/bintray/v/efff/maven/StringCareAndroidPlugin.svg
2427

2528
License
2629
-------
@@ -39,3 +42,5 @@ License
3942
limitations under the License.
4043

4144

45+
[link]: https://github.com/StringCare/AndroidLibrary
46+
[badge]: https://img.shields.io/bintray/v/efff/maven/StringCareAndroidLibrary.svg

StringCareSchema.png

-911 Bytes
Loading

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ dependencies {
3838
})
3939
implementation 'com.android.support:appcompat-v7:28.0.0'
4040
testImplementation 'junit:junit:4.12'
41-
// implementation project(path: ':library')
42-
implementation "com.stringcare:library:$stringcare_version"
41+
implementation project(path: ':library')
42+
// implementation "com.stringcare:library:$stringcare_version"
4343
}
4444

4545

app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ protected void onCreate(Bundle savedInstanceState) {
2222
String password = "lalilulelo";
2323

2424
String message = "\n\nFor Metal Gear lovers:\n\n\"Snake, the password is " + SC.obfuscate(password)
25-
+ "\n\n.. or " + SC.deobfuscate(SC.obfuscate(password)) + "\"";
25+
+ "\n\n.. or " + SC.reveal(SC.obfuscate(password)) + "\"";
2626

2727
((TextView) findViewById(R.id.example_a)).setText(Html.fromHtml(message));
2828

29-
String numbers = getString(R.string.test_a, "hi", 3) + " is " + SC.deobfuscate(R.string.test_a, "hi", 3);
29+
String numbers = getString(R.string.test_a, "hi", 3) + " is " + SC.reveal(R.string.test_a, "hi", 3);
3030
((TextView) findViewById(R.id.example_b)).setText(numbers);
3131
final SCTextView tvAuto = findViewById(R.id.auto_tv);
3232
findViewById(R.id.btn_change).setOnClickListener(new View.OnClickListener() {

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ buildscript {
1515
}
1616

1717
dependencies {
18-
classpath "com.stringcare:plugin:$stringcare_version"
19-
// classpath files('../GradlePlugin/build/libs/plugin-0.9.jar')
18+
// classpath "com.stringcare:plugin:$stringcare_version"
19+
classpath files('../GradlePlugin/build/libs/plugin-1.2.jar')
2020
// classpath files('..\\GradlePlugin\\build\\libs\\plugin-0.9.jar')
21-
classpath 'com.android.tools.build:gradle:3.2.1'
21+
classpath 'com.android.tools.build:gradle:3.4.0'
2222
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1"
2323
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
2424
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Jan 15 17:50:13 CET 2019
1+
#Tue May 07 22:19:17 CEST 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

library/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Sets the minimum version of CMake required to build the native library.
55

6-
cmake_minimum_required(VERSION 3.13.2)
6+
cmake_minimum_required(VERSION 3.10.2)
77

88
# Creates and names a library, sets it as either STATIC
99
# or SHARED, and provides the relative paths to its source code.

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'com.jfrog.bintray'
44

5-
version = "1.2"
5+
version = "1.5"
66

77
android {
88
compileSdkVersion 28
@@ -32,7 +32,7 @@ android {
3232
}
3333
externalNativeBuild {
3434
cmake {
35-
version "3.13.2"
35+
version "3.14.3"
3636
path "CMakeLists.txt"
3737
}
3838
}

library/src/main/java/com/stringcare/library/SC.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public static String obfuscate(String value) {
201201
* @param id
202202
* @return String
203203
*/
204-
public static String deobfuscate(@StringRes int id) {
204+
public static String reveal(@StringRes int id) {
205205
if (context == null) {
206206
Log.e(TAG, "Library not initialized: SC.init(Context)");
207207
return null;
@@ -219,7 +219,7 @@ public static String deobfuscate(@StringRes int id) {
219219
* @param value
220220
* @return String
221221
*/
222-
public static String deobfuscate(String value) {
222+
public static String reveal(String value) {
223223
if (context == null) {
224224
Log.e(TAG, "Library not initialized: SC.init(Context)");
225225
return null;
@@ -238,8 +238,8 @@ public static String deobfuscate(String value) {
238238
* @param formatArgs
239239
* @return
240240
*/
241-
public static String deobfuscate(@StringRes int id, Object... formatArgs) {
242-
String value = deobfuscate(id);
241+
public static String reveal(@StringRes int id, Object... formatArgs) {
242+
String value = reveal(id);
243243
Locale locale;
244244
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
245245
locale = Resources.getSystem().getConfiguration().getLocales().get(0);
@@ -275,7 +275,7 @@ public static String encryptString(String value) {
275275
* Decrypts the given value
276276
* @param value
277277
* @return String
278-
* @deprecated use {@link #deobfuscate(String)}()} instead.
278+
* @deprecated use {@link #reveal(String)}()} instead.
279279
*/
280280
@Deprecated
281281
public static String decryptString(String value) {
@@ -319,7 +319,7 @@ public static String getString(@StringRes int id) {
319319
* @param id
320320
* @param formatArgs
321321
* @return String
322-
* @deprecated use {@link #deobfuscate(int, Object...)}()} instead.
322+
* @deprecated use {@link #reveal(int, Object...)}()} instead.
323323
*/
324324
@Deprecated
325325
public static String getString(@StringRes int id, Object... formatArgs) {

library/src/main/java/com/stringcare/library/SCTextView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ private void reloadText() {
6666
@Override
6767
public void contextReady() {
6868
if (isHTML) {
69-
setText(Html.fromHtml(SC.deobfuscate(val)));
69+
setText(Html.fromHtml(SC.reveal(val)));
7070
} else {
71-
setText(SC.deobfuscate(val));
71+
setText(SC.reveal(val));
7272
}
7373
}
7474
});

0 commit comments

Comments
 (0)