简体   繁体   中英

generate agitar test cases with Gradle

I am currently generating agitar test cases through eclipse.

But, is there any way that we can generate ( not run ) agitar test cases with Gradle.

Please suggest

Not familiar with agitar but assuming it's just a jar in a maven repo

buildscript {
    dependencies {
        classpath 'foo.bar:agitar:x.y.z'
    }
}

task generateAgitar {
    File inputDir = file("src/main/java")
    File outputDir = file("$buildDir/agitar")
    inputs.dir inputDir
    outputs.dir outputDir
    doLast {
        outputDir.mkdirs()
        foo.bar.agitar.SomeAgitarGenerator generator = new foo.bar.agitar.SomeAgitarGenerator();
        generator.generate(inputDir, outputDir)
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM