Skip to content

Commit

Permalink
sample拆分出独立两个项目
Browse files Browse the repository at this point in the history
  • Loading branch information
MegatronKing committed Mar 4, 2019
1 parent 2722a35 commit 2d4ee97
Show file tree
Hide file tree
Showing 36 changed files with 27 additions and 282 deletions.
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -108,14 +108,13 @@ public final class StringFogImpl implements IStringFog {
}
```
#### 自定义加解密算法集成
集成自定义算法有两种方式:
- 编译成jar或者上传至maven仓库,用classpath引入到根目录build.gradle和implementation引入到app的build.gradle中。
- 将java源文件放置到根目录buildSrc/src/main/java下,以及app源码目录中。

#### Mapping文件
加解密的字符串明文和暗文会自动生成mapping映射文件,位于outputs/mapping/stringfog.txt。

## 范例
- 默认加解密算法集成,参考[sample2](https://github.com/MegatronKing/StringFog-Sample2)
- 自定义加解密算法集成,参考[sample1](https://github.com/MegatronKing/StringFog-Sample1)

## 更新日志

Expand Down
File renamed without changes.
20 changes: 4 additions & 16 deletions stringfog-sample-library/build.gradle → app/build.gradle
@@ -1,29 +1,18 @@
apply plugin: 'com.android.library'
apply plugin: 'stringfog'

// 每个Library可以定义不同的加密key
stringfog {

key 'Hello Library'
enable true
debug false
implementation 'com.github.megatronking.stringfog.xor.StringFogImpl'
}
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.github.megatronking.stringfog"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {
release {
minifyEnabled false
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand All @@ -35,6 +24,5 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.github.megatronking.stringfog:xor:1.0.0'
testImplementation 'junit:junit:4.12'
}
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,17 @@
package com.github.megatronking.stringfog;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// 范例请参考:
// https://github.com/MegatronKing/StringFog-Sample1
// https://github.com/MegatronKing/StringFog-Sample2
}

}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions build.gradle
Expand Up @@ -6,11 +6,9 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath 'com.github.megatronking.stringfog:gradle-plugin:2.0.1'
classpath 'com.github.megatronking.stringfog:xor:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 0 additions & 2 deletions buildSrc/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion buildSrc/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions buildSrc/build.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
2 changes: 1 addition & 1 deletion settings.gradle
@@ -1,4 +1,4 @@
include ':stringfog-sample-app', ':stringfog-gradle-plugin', ':stringfog-sample-library', ':stringfog-interface'
include ':app', ':stringfog-gradle-plugin', ':stringfog-interface'
file('stringfog-ext').listFiles().each {
if (it.isDirectory()) {
include ":stringfog-ext:${it.name}"
Expand Down
43 changes: 0 additions & 43 deletions stringfog-sample-app/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions stringfog-sample-app/src/main/java/exclude/ExcludeTest.java

This file was deleted.

1 change: 0 additions & 1 deletion stringfog-sample-library/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions stringfog-sample-library/proguard-rules.pro

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions stringfog-sample-library/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions stringfog-sample-library/src/main/res/values/strings.xml

This file was deleted.

This file was deleted.

0 comments on commit 2d4ee97

Please sign in to comment.