Using tasks.inputs for an input configuration

Hi, im having trouble importing an old ant build script into gradle.

Basically i am importing an old ant build into gradle.
It works but now i want to add up-to-date checks for the heavy ant tasks.
I have done it for files and directories like so:

apply plugin: 'base'
ant.importBuild('src/build.xml') { "ant$it".toString() }


But i dont know how to properly check the classpath for the build
I have tried two things'classpath', configurations.compileClasspath)
antcompile.inputs.files('classpath', configurations.compileClasspath)

Either will trigger a new build from what i see when running with --info but i would like the same check as @Classpath annotation gives.

Can anybody help?

The @Classpath annotation is closest to @InputFiles with some special handling, so use inputs.files() over Try using the below to more closely match the @Classpath behavior:

1 Like