Gradle exits java process after ant call completes

I port one of our modules to gradle : gradle -module . This module has two dependencies that are currently being built using ant: ant -module-1 and ant -module-2

In my gradle build.gradle module, I have the following entries:

task packageAntModule1(type: GradleBuild) {
    buildFile = 'antModule1.gradle'
    tasks = ['clean', 'package']
}

task packageAntModule2(type: GradleBuild) {
    buildFile = 'antModule2.gradle'
    tasks = ['clean', 'package']
}

compileJava.dependsOn(['packageAntModule1', 'packageAntModule2'])

The two files antModule1.gradle and antModule2.gradle are simple:

antModule1.gradle:
ant.importBuild '../ant-module1/build.xml'

antModule2.gradle:2
ant.importBuild '../ant-module2/build.xml'

gradle -, ant -module1 , ant -module2. , , ant -module1, . java-, , java ant, - ( ant)

, , gradle JVM ant .

, ant. maven artifactory nexus , ant , gradle

gradle build Java-, ant, .

UPDATE, gradle

$gradle -version
------------------------------------------------------------
Gradle 2.4
------------------------------------------------------------
Build time:   2015-05-05 08:09:24 UTC
Build number: none
Revision:     5c9c3bc20ca1c281ac7972643f1e2d190f2c943c

Groovy:       2.3.10
Ant:          Apache Ant(TM) version 1.9.4 compiled on April 29 2014
JVM:          1.8.0_40 (Oracle Corporation 25.40-b25)
OS:           Windows 7 6.1 amd64
+1
1

taskdef , ant? , , .

, taskdef , , ant .

, packageAntModule1 packageAntModule2.

0

Source: https://habr.com/ru/post/1606312/


All Articles