# ArouterPlugin **Repository Path**: bsding/arouter-plugin ## Basic Information - **Project Name**: ArouterPlugin - **Description**: 一个用来适配阿里路由框架Arouter的插件(适配agp8.3.0) - **Primary Language**: Android - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-26 - **Last Updated**: 2025-12-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ArouterPlugin ## 介绍 一个用来适配阿里路由框架Arouter的插件(适配agp8.3.0) 官方https://github.com/alibaba/ARouter路由框架的 路由插件arouter-register目前最新是1.0.2 没有适配agp至8.x.x,本插件是为了解决该问题。 适用于项目工程中升级agp至8.x.x后无法使用官方的arouter-register插件问题 ## 插件核心原理 1. 在编译时扫描如下三种类(ARouter自动生成的) ![扫描类](pics/20251202-110718.png) 2. 通过asm技术将它们自动注册到**LogisticsCenter**的**loadRouterMap** 方法**末尾**中,从而避免app启动运行时的扫描耗时。 ## 使用说明 1. 项目build.gradle添加如下代码,引用指定版本插件 ```groovy buildscript{ repositories { gradlePluginPortal() } dependencies{ classpath "io.gitee.bsding:arouterPlugin:1.0.0" } } ``` 2. 项目主工程app中的build.gradle添加 ```groovy apply plugin: 'io.gitee.bsding.arouter' ```