-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Groovy Test Project Config #422
Comments
@larsgrefer Apologies for the direct tagging, but any chance I can get your expertise on this? |
Have you tried this:?
|
Hi @larsgrefer plugins {
id 'java'
id 'groovy'
id 'io.qameta.allure' version '2.8.1'
id "io.freefair.aspectj.post-compile-weaving" version "5.1.0"
}
group 'com.example'
version '1.0-SNAPSHOT'
repositories {
mavenLocal()
mavenCentral()
}
ext {
allureVersion = '2.14.0'
junitVersion = '5.7.1'
}
sourceCompatibility = '8'
targetCompatibility = '8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
implementation('org.codehaus.groovy:groovy:3.0.8')
testImplementation('org.seleniumhq.selenium:selenium-java:4.0.0')
testImplementation('org.slf4j:slf4j-simple:1.7.30')
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
testImplementation group: 'com.xx', name: 'xxxxxx', version: '2.2'
testAspect 'com.xx:xxxxxx:2.2'
testImplementation "org.aspectj:aspectjrt:1.9.5"
}
compileTestJava.ajc.options.aspectpath.from sourceSets.main.output
compileTestGroovy.ajc.options.aspectpath.from sourceSets.main.output
test {
useJUnitPlatform()
}
allure {
autoconfigure = true
version = "${allureVersion}"
useJUnit5 {
version = "${allureVersion}"
}
}
|
Please note this is a groovy project -aspectpath contains -inpath |
Hi,
Is there any special config required to have groovy gradle test projects work with AspectJ plugin?
When I run my tests, I keep getting the below
[AppClassLoader@73d16e93] error aspect 'MYASPECT' (contained in a dependancy jar which is added via gradle dependancy) woven into 'xxxxxxxxx' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW).
When I add a test to my main (src\main\groovy) I can execute perfectly.
Its just with the test task that my aspects do not seem to apply
In terms of my build,gradle, I add
in plugin:
in dependancy:
The text was updated successfully, but these errors were encountered: