Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.deezer:Android-Aspectj-Plugin:1.0'
}
dependencies {
implementation("com.github.deezer:Android-Aspectj-Plugin:1.0")
}
<dependency>
<groupId>com.github.deezer</groupId>
<artifactId>Android-Aspectj-Plugin</artifactId>
<version>1.0</version>
</dependency>
libraryDependencies += "com.github.deezer" % "Android-Aspectj-Plugin" % "1.0"
:dependencies [[com.github.deezer/Android-Aspectj-Plugin "1.0"]]
A Gradle plugin which enables AspectJ for Android builds. This plugin is largely based on the deprecated plugin by uPhyca
You need to add the plugin's classpath to your project's build.gradle
buildscript {
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.github.deezer:Android-Aspectj-Plugin:1.0'
}
}
Then apply the android-aspectj
plugin to your app or library module :
apply plugin: 'android-aspectj'
You can specify additional AspectJ compilation flags like this (see here for a list of available flags.
androidAspectJ {
extraAspectJFlags = [
"-Xlint:ignore", // errors | warning | ignore
"-preserveAllLocals", // preserve local variable names
"-showWeaveInfo", // show information about weaving
"-g:lines,vars,source", // add debug info for any/all of [lines, vars, source]
]
}
Feel free to open issues, or to send pull requests our way.
This plugin is distributed under the MIT License