Closed gorru closed 3 years ago
Hi, @gorru,
You shouldn't need to add the dependency for Byte Buddy. This is declared by JUnit Foundation itself and should therefore be automatically included as a transitive dependency.
I'm using Android Studio 4.1.1 in a simple project to test the ability to use JUnit Foundation in an Android project. The one thing to be aware of is that a basic Android project includes a top-level build file and sub-projects. I had to include the JUnit Foundation elements in the sub-project build script. Putting these elements in the top-level build file didn't work.
Could you please share your test project? Mine project also contains a sub project and there I configured Junit-foundation without success.
I retested Junit-foundation integrating it in a project I took from github. It obviously works even changing it to be more similar to mine (using androidx and other dependencies). No problems regarding netbuddy dependency nor "-javaagent:${classpath.find { it.name.contains('junit-foundation') }.absolutePath}" error. I peraphs noticed that it stops to work adding useJUnitPlatform() Is junit 5 supported by junit-foundation ?
@gorru No, this library is specifically designed to work with JUnit 4. Which specific feature(s) of JUnit Foundation were you hoping to employ in your project?
Since this issue appears related to an attempt to use JUnit Foundation with JUnit 5, I'm closing it.
Hello. I'm trying to use JUnit-Foundation on an Android gradle project. I follow your setup and added the
section but when I try to synchronize gradle (or run a build) I get alway the
Cannot get property 'absolutePath' on null object
error. Any advice? Here my (partial) build.gradle