Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert 1 master #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@
![image](https://raw.githubusercontent.com/mzule/ActivityRouter/master/gif/http.gif)

## 集成

### 1. 添加引用

请根据项目的历史情况选择合适的集成方式

#### 1.1 annotaitonProcessor 方式

``` groovy
dependencies {
compile 'com.github.mzule.activityrouter:activityrouter:1.2.2'
annotationProcessor 'com.github.mzule.activityrouter:compiler:1.1.7'
}
```

#### 1.2 apt 方式
根目录 build.gradle

``` groovy
Expand All @@ -41,12 +26,11 @@ buildscript {
apply plugin: 'android-apt'

dependencies {
compile 'com.github.mzule.activityrouter:activityrouter:1.2.2'
apt 'com.github.mzule.activityrouter:compiler:1.1.7'
compile 'com.github.mzule.activityrouter:activityrouter:1.2.2'
apt 'com.github.mzule.activityrouter:compiler:1.1.7'
}

```
### 2. 集成

在`AndroidManifest.xml`配置

Expand Down Expand Up @@ -230,10 +214,6 @@ public static void logout(Context context, Bundle bundle) {

### 支持多模块

* 每个包含 activity 的 module 都要添加 apt 依赖
* 每个 module(包含主项目) 都要添加一个 @Module(name) 的注解在任意类上面,name 是项目的名称
* 主项目要添加一个 @Modules({name0, name1, name2}) 的注解,指定所有的 module 名称集合

## 混淆配置

``` groovy
Expand Down
1 change: 1 addition & 0 deletions activityrouter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'com.neenbedankt.android-apt'

sourceCompatibility = 1.7
targetCompatibility = 1.7
Expand Down
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

sourceCompatibility = 1.7
targetCompatibility = 1.7
Expand Down Expand Up @@ -31,5 +32,5 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile project(':app_module')
annotationProcessor project(':compiler')
apt project(':compiler')
}
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@

<TextView
style="@style/Menu"
android:text="router://logout"/>
android:text="mzule://logout"/>

<TextView
style="@style/Menu"
android:text="router://upload"/>
android:text="mzule://upload"/>
</LinearLayout>
3 changes: 2 additions & 1 deletion app_module/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 24
Expand Down Expand Up @@ -29,5 +30,5 @@ dependencies {
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
compile project(':activityrouter')
annotationProcessor project(':compiler')
apt project(':compiler')
}
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ ext {
}

dependencies {
compile 'com.squareup:javapoet:1.8.0'
compile 'com.google.auto.service:auto-service:1.0-rc3'
compile 'com.google.auto.service:auto-service:1.0-rc2'
compile 'com.squareup:javapoet:1.6.1'
compile 'com.github.mzule.activityrouter:annotation:1.1.5'
}

Expand Down