# 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**: 1 - **Forks**: 0 - **Created**: 2025-11-26 - **Last Updated**: 2025-12-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ArouterPlugin ## Description A plugin adapted for Alibaba's routing framework ARouter (compatible with AGP 8.3.0) The official routing plugin arouter-register of the routing framework hosted at https://github.com/alibaba/ARouter is currently at version 1.0.2, which does not support AGP 8.x.x. This plugin is designed to address this issue. It applies to projects that encounter the problem of being unable to use the official arouter-register plugin after upgrading AGP to 8.x.x. ## Software Architecture A gradle plugin adapted for Alibaba's routing framework ARouter (compatible with AGP 8.3.0) ## Core Principles of the Plugin 1. Scan the following three types of classes (automatically generated by ARouter) at compile time: ![扫描类](pics/20251202-110718.png) 2. Use **ASM** technology to automatically register them at the end of the **loadRouterMap** method in **LogisticsCenter**, thereby avoiding the scanning time consumption during app startup and runtime. ## Installation 1. Project-level build.gradle: Add the specified version plugin dependency. In the project's root-level build.gradle file, add the following code inside the buildscript block to declare the plugin dependency. This allows Gradle to locate and download the plugin artifact. ```groovy buildscript{ repositories { gradlePluginPortal() } dependencies{ classpath "io.gitee.bsding:arouterPlugin:1.0.0" } } ``` 2. Application module (app) build.gradle: Apply the plugin. In the build.gradle file of the module where the plugin is required (e.g., the main application module app), use the apply plugin statement to activate and apply the plugin logic. ```groovy apply plugin: 'io.gitee.bsding.arouter' ```