Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Androiddevtools | 7,621 | 21 days ago | 8 | |||||||
收集整理Android开发所需的Android SDK、开发中用到的工具、Android开发教程、Android设计规范,免费的设计素材等。 | ||||||||||
Detekt | 5,664 | 28 | 15 hours ago | 30 | August 30, 2021 | 157 | apache-2.0 | Kotlin | ||
Static code analysis for Kotlin | ||||||||||
Gradle Retrolambda | 5,388 | 68 | 3 | 4 years ago | 40 | April 21, 2019 | 74 | apache-2.0 | Java | |
A gradle plugin for getting java lambda support in java 6, 7 and android | ||||||||||
Packer Ng Plugin | 4,796 | 32 | 1 | a year ago | 12 | March 03, 2017 | 21 | apache-2.0 | Java | |
下一代Android打包工具(对Gradle 7.x的支持,欢迎提PR) | ||||||||||
Gradle Versions Plugin | 3,689 | 11 | 13 | 4 days ago | 20 | May 31, 2017 | 84 | apache-2.0 | Kotlin | |
Gradle plugin to discover dependency updates | ||||||||||
Gradle_plugin_android_aspectjx | 3,499 | 2 years ago | 145 | apache-2.0 | Groovy | |||||
A Android gradle plugin that effects AspectJ on Android project and can hook methods in Kotlin, aar and jar file. | ||||||||||
Shadow | 3,375 | 8 days ago | 240 | apache-2.0 | Groovy | |||||
Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin. | ||||||||||
Aboutlibraries | 3,317 | 2 | 8 days ago | 103 | July 17, 2023 | 9 | apache-2.0 | Kotlin | ||
AboutLibraries automatically collects all dependencies and licenses of any gradle project (Kotlin MultiPlatform), and provides easy to integrate UI components for Android and Compose-jb environments | ||||||||||
Dokka | 3,034 | 12 | 13 hours ago | 21 | June 05, 2023 | 448 | apache-2.0 | Kotlin | ||
API documentation engine for Kotlin | ||||||||||
Dexcount Gradle Plugin | 3,015 | 5 months ago | 46 | January 16, 2023 | 2 | apache-2.0 | Java | |||
A Gradle plugin to report the number of method references in your APK on every build. |
RoboAspectJ is a Gradle plugin to introduce AspectJ (Aspect-Orient Programming) to Android project. It compiles aspects(if needed) and weave them all together in FULL-PROJECT scope. This means project (or subproject) sources, external libraries and local dependencies will all be dealt with by default.
Note: This plugin may change due to the modification of transform-api. So you may keep track of RoboAspectJ to make sure you're using the most recent version.
latest version: v0.9.1
Android Plugin (application) 2.1.0
Add plugin dependency in buildscript classpath:
buildscript {
dependencies {
classpath 'com.meituan.gradle:roboaspectj:0.9.+'
}
}
Apply plugin:
apply plugin: 'com.meituan.roboaspectj'
There are basically 2 ways to write your aspects and weave them into production code:
write aspects in @AspectJ syntax under your project's java source directory. e.g. {$projectDir}/src/main/java/
compile and bundle your aspects independently using ajc, then make it dependency in build script. For example:
compile 'com.example.myaspects:library:1.0'
This way may be a little bit complicated. But it's suitable for those who want to maintain their aspects as an independent project.
While RoboAspectJ is registered globally, we still can do our crosscutting concern under specific variant. Actually, this is already done by Android plugin.
put variant-specific aspects under corresponding folder.
For example, I want to do some performance monitoring in myflavor
, so I will write aspects under ${projectDir}/src/myflavor/java/
.
add variant-specific aspects dependency to corresponding configuration scope.
myflavorCompile 'com.example.myaspects:library:1.0'
There is an extension aspectj
for you to do some tweaking.
If you want to leave some artifact untouched from AspectJ, using:
aspectj {
exclude group: 'com.google.android', module: 'support-v4'
}
When applying rxjava
or retrolambda
, you may need jrt.jar
as classpath. Configure it by:
aspectj {
javartNeeded true
}
For debug or performance use, you can disable weaving:
aspectj {
enable false //by default, it's true and you don't have to add this statement.
}
alternatively, set roboaspectj.enable
property false
when run gradle.
$ gradle clean assembleDebug -Droboaspectj.enable=false
Maybe you want it to be smarter to disable it when it's a debug flavor, then add this to your build script:
aspectj {
disableWhenDebug true // default is false
}
or, specify roboaspectj.disableWhenDebug
property.
$ gradle clean assembleDebug -Droboaspectj.disableWhenDebug=true
Though weaving is disabled, Aspects and AspectJ compile dependencies are all still there. It's only the weaving step doesn't happen.
Note: Corresponding property has precedence over config in build script in both of these 2 cases. For instance, weaving will not take effect when your
roboaspectj.enable
property isfalse
, no matter what you config in build script.
Code is under the Apache Licence v2.
This plugin is currently a prototype, and it still has much to improve. Feel free to contact: [email protected]