gradle-aspectj-binary | Gradle plugin for AspectJ binary weaving | Plugin library
kandi X-RAY | gradle-aspectj-binary Summary
kandi X-RAY | gradle-aspectj-binary Summary
Gradle plugin for AspectJ binary weaving
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gradle-aspectj-binary
gradle-aspectj-binary Key Features
gradle-aspectj-binary Examples and Code Snippets
Community Discussions
Trending Discussions on gradle-aspectj-binary
QUESTION
I am trying to use Kotlin 1.2.30 with AspectJ (using the following AspectJ gradle plugin: github repo, no affiliation with the author). My build gradle seems to work with older versions of kotlin (e.g. 1.1.1), but not with 1.2 versions.
I am trying to add aspects to the following Main.kt file:
...ANSWER
Answered 2018-Jul-14 at 18:24The cause of the problem was that kotlin 1.1.1 puts kotlin classes to build/classes/java
while kotlin 1.2.30 compiles .class files to build/classes/kotlin
. The AspectJ gradle plugin I used reads .class files for weaving from sourceSets.main.output.classesDir
directory, which by default is set to build/classes/java
and there are no files in my project there. I think plugin author should change its code to use sourceSets.main.output.classesDirs
instead, which allows for many .class output directories, what is especially important in polyglot project.
Nevertheless I adressed the problem with 1.2.30 kotlin incompatibility in a hacky way by adding sourceSets.main.output.classesDir=sourceSets.main.output.classesDir.toString().replace("java", "kotlin")
line to my build.gradle
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gradle-aspectj-binary
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page