A gradle plugin for android aspectj, android aop,support kotlin,multiple flavors,multiple module
An gradle plugin for android project aspectj
Support for multiple library, Kotlin, Java
Support for debug mode,release mode or close
Support for multiple flavors
project: build.gradle
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.aspectj:aspectjtools:1.8.9'
classpath 'com.dhaspject:dhaspject:1.1.1'
}
app module(main module): build.gradle
apply plugin: "com.dhaspject"
laop{
kotlinfiles("testpro.com","com.kotlin") //kotlin package need to be aspject
javafiles("com.lin") //java package need to be aspject
aopModule("api_log") // the aop library name
aopType("debug") // aop type, debug: debug mode, default: always use, close: unuse
hasFlavors(true) //if have flavors
}
dependencies{
...
implementation 'org.aspectj
1.8.9'
}
api_log( aop module): build.gradle( the aop module, you can modify the name by yourself)
apply plugin: "com.dhaspject"
laop{
aopModule("api_log")
aopType("debug")
useJavaTask(true) //(Opertion) IF kotlin file not effective
}
dependencies{
...
implementation 'org.aspectj
1.8.9'
}
other module need aspject:
my_lib: build.gradle
apply plugin: "com.dhaspject"
laop{
javafiles("com.lance.aspectlib") // witch package need to be aspject
aopModule("api_log") //the aop modle
aopType("debug")
}
dependencies{
...
implementation 'org.aspectj
1.8.9'
}