AntBuilder ignore targets when import 2 or more build.xml using ant.importBuilder() on build.gradle.kts

141 views Asked by At

I need to import many ant files(build.xml) for a build.gradle.kts. If I import only one build.xml working fine, but if a try a second build file this second file don't have all targets imported.

I tried rename all task during import using


ant.importBuild("../project1/build.xml") { antTaskName ->
    "ant-project1-$antTaskName"
}
ant.importBuild("../project2/build.xml") { antTaskName ->
    "ant-project2-$antTaskName"
}

All targets are renamed, but all target with the same name in project2 build.xml file not are imported.

I enable verbose mode and received this messages:

Already defined in main or a previous import, ignore clean

Already defined in main or a previous import, ignore deploy

Clean and Deploy are targets commons between project1 and project2.

I need to import all targets renaming with the project name suffix.

0

There are 0 answers