8000 GitHub - liang33zhou/Router-master: Router Dmeo
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

liang33zhou/Router-master

Repository files navigation

Build Status license API PullRequest

Router

建议浏览中文wiki.

screenshot

Getting started

You should use a version of the Android gradle plugin 2.2 or above to supoort annotation processor.

  • Add dependencies by adding the following lines to your top level project/build.gradle:
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
    	...
        classpath 'com.chenenyu.router:gradle-plugin:0.8.1'
    }
}

// Optional. 指定版本号.
ext {
    ...
    routerVersion = "x.y.z" // 指定特定的router版本
    compilerVersion = "x.y.z" // 指定特定的router-compiler版本
}
  • Apply router plugin in your app/build.gradle or lib/build.gradle:
apply plugin: 'com.android.application/library'
...
apply plugin: 'com.chenenyu.router'

current router-gradle-plugin version: Download

current router version: Download

current router-compiler version: compiler

gradle-plugin version router version compiler version
0.1.0 0.4.0 0.2.0
0.2.0 0.5.0 0.2.0
0.3.0 0.7.0 0.3.0
0.4.0 0.8.0 0.4.0
0.5.0 0.9.1 0.5.0
0.6.0 1.0.0 0.5.0
0.7.0 1.0.4 0.5.0
0.8.1 1.1.0 0.6.0

Simple usage

Router uses annotation to specify the mapping relationship.

@Route("test")
public class TestActivity extends AppCompatActivity {
	...
}

Then you can just call Router.build("test").go(context) to open TestActivity, so cool! ​:clap:​​:clap:​​:clap:​

If you configured multiple route @Route({"test","wtf"}), both test and wtf can lead to TestActivity.

Advanced usage

Please refer to the wiki for more informations.

ProGuard

# Router
-keep class com.chenenyu.router.** {*;}
-keep class * implements com.chenenyu.router.RouteInterceptor {*;}

Contact

QQ group: 271849001

Other Libraries

SuperAdater: Adapter knife(万能的Adapter).

img-optimizer-gradle-plugin : 一款用于优化png图片的gradle插件.

License

Apache 2.0

About

Router Dmeo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0