Archinamon / android-gradle-aspectj

gradle plug-in adding supports of AspectJ into Android project
Apache License 2.0
363 stars 58 forks source link

AGP 4.2.0 support #137

Open powturns opened 3 years ago

powturns commented 3 years ago

Fix build errors for android google plugin 4.2.0

https://developer.android.com/studio/releases/gradle-plugin#4-2-0

eyedol commented 3 years ago

Does it work with AGP 4.2.1 also? I believe so.

powturns commented 3 years ago

It seems to, but I haven't tested extensively.

For anyone else waiting for this MR to go in, you can use this dependency in the mean time: com.github.Archinamon:android-gradle-aspectj:PR137-SNAPSHOT

Just make sure you have the jitpack maven repo in your project.

dmitrikudrenko commented 3 years ago

@eyedol Will you merge it?

davidwong commented 3 years ago

FYI this seems to work with AGP 7.0.0-beta03 using the standard version of the plugin (not fully tested, just tried with simple aj file). Just be aware that if using java 11 in the project, that the plugin doesn't seem to pass on the java module options to ajc. So using this config was OK: aspectj { ajc = '1.9.6' java = JavaVersion.VERSION_1_8 } However using 'java = JavaVersion.VERSION_11' caused problems in the aj file with a message about ambiguous classes.

eyedol commented 3 years ago

Will you merge it?

@dmitrikudrenko I won't be able to merge it as I don't have the ability to do so 😢

jiechic commented 2 years ago

FYI this seems to work with AGP 7.0.0-beta03 using the standard version of the plugin (not fully tested, just tried with simple aj file). Just be aware that if using java 11 in the project, that the plugin doesn't seem to pass on the java module options to ajc. So using this config was OK: aspectj { ajc = '1.9.6' java = JavaVersion.VERSION_1_8 } However using 'java = JavaVersion.VERSION_11' caused problems in the aj file with a message about ambiguous classes.

test confing

aspectj {
//    dryRun false // default value
//    compileTests true // default value

    ajc '1.9.5' // default value
    java = JavaVersion.VERSION_11 // default value
}