Unable to link cunit tests after upgrading to 2.5

I have just upgraded from gradle 2.0 to gradle 2.5 and have one outstanding problem that I am not able to resolve. I am using the cunit plugin and have some rudimentary tests, however when I attempt to assemble the cunit launcher, the build fails on link as follows

Creating library G:\dev\k-8\broker\build\binaries\brokerTestCUnitExe\brokerTest.lib and object G:\dev\k-8\broker\build\binaries\brokerTestCUnitExe\brokerTest.exp
gradle_cunit_main.obj : error LNK2019: unresolved external symbol _gradle_cunit_register referenced in function _main
G:\dev\k-8\broker\build\binaries\brokerTestCUnitExe\brokerTest.exe : fatal error LNK1120: 1 unresolved externals

I have tried a few different things but am not an expert in c++, so I’m struggling to understand how to resolve the issue. Any pointers would be appreciated. Oh, I am running on Windows 7, VS2013, AMD x64 however my CUnit lib is x86 and am trying to build for that architecture.

Many thanks

project(':broker') {
    apply plugin: "c"
    apply plugin: "cunit"

    model {
        platforms {
            x86 {
                architecture "x86"
            }
        }
        repositories {
            libs(PrebuiltLibraries) {
                cunit {
                    headers.srcDir "G:/dev/libs/CUnit-2.1-3/headers"
                    binaries.withType(StaticLibraryBinary) {
                        staticLibraryFile = file("G:/dev/libs/CUnit-2.1-3/lib/cunitStaticLibrary/vs2013/cunit.lib")
                    }
                }
                jvm_1_8_x32 {
                    headers.srcDirs "G:/ProgX32/java/jdk1.8.0_20-32bit/include", "G:/ProgX32/java/jdk1.8.0_20-32bit/include/win32"
                    binaries.withType(StaticLibraryBinary) {
                        staticLibraryFile = file("G:/ProgX32/java/jdk1.8.0_20-32bit/lib/jvm.lib")
                    }
                }


            }
        }
        components {
            broker(NativeLibrarySpec) {
                targetPlatform "x86"
            }
        }
    }

    binaries.withType(CUnitTestSuiteBinarySpec) {
        lib library: "cunit", linkage: "static"
    }

    binaries.all {
        lib library: "jvm_1_8_x32", linkage: "static"

        cCompiler.define "WIN32_LEAN_AND_MEAN"
        cCompiler.define "UNICODE"
        cCompiler.define "NDEBUG"
        cCompiler.define "EXPORTING"

        if (toolChain in VisualCpp) {
            cCompiler.args "/EHsc"
            cCompiler.args "/Zi"
            cCompiler.args "/FS"
            linker.args "/DEBUG"
        }
    }
}

Looks like you haven’t implemented gradle_cunit_register(). See samples/native-binaries/cunit/src/operatorsTest/c/suite_operators.c for an example.

Thanks for the response Tony, I hadn’t thought about the samples. Turned out my tests were in src/brokerTest/cunit rather than src/brokerTest/c, which for some reason worked in gradle 2.0. Renaming the directory was all that was needed.

Craig