Simply add the java plugin to the google-test sample code as follows.
apply plugin: 'cpp'
apply plugin: 'google-test'
apply plugin: 'java'
The gradle build shows the following error messages.
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring root project ‘google-test’.
Exception thrown while executing model rule: org.gradle.nativeplatform.test.plugins.NativeBinariesTestPlugin$Rules#attachBinariesToCheckLifecycle(org.gradle.model.ModelMap<org.gradle.api.Task>, org.gradle.platform.base.BinaryContainer)
Cannot add rule org.gradle.nativeplatform.test.plugins.NativeBinariesTestPlugin$Rules#attachBinariesToCheckLifecycle(org.gradle.model.ModelMap<org.gradle.api.Task>, org.gradle.platform.base.BinaryContainer) > named(check) for model element ‘tasks.check’ at state Initialized as this element is already at state GraphClosed.
- Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Please explain which plugin deserves a fix. My project really needs both to be applied.