{"id":1422,"date":"2011-09-18T11:44:11","date_gmt":"2011-09-18T20:44:11","guid":{"rendered":"https:\/\/www.kellyrob99.com\/blog\/?p=1422"},"modified":"2011-09-18T11:44:11","modified_gmt":"2011-09-18T20:44:11","slug":"using-gradle-to-bootstrap-your-legacy-ant-builds","status":"publish","type":"post","link":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/","title":{"rendered":"Using Gradle to Bootstrap your Legacy Ant Builds"},"content":{"rendered":"<p>Gradle provides several different ways to leverage your existing investment in Ant, both in terms of accumulated knowledge and the time you&#8217;ve already put into build files. This can greatly facilitate the process of porting Ant built projects over to Gradle, and can give you a path for incrementally doing so. The <a href=\"http:\/\/gradle.org\/current\/docs\/userguide\/userguide_single.html#ant\">Gradle documentation<\/a> does a good job of describing how you can use Ant in your Gradle build script, but here&#8217;s a quick overview and some particulars I&#8217;ve run into myself.<\/p>\n<p><\/p>\n<h2>Gradle AntBuilder<\/h2>\n<p>Every Gradle Project includes an AntBuilder instance, making any and all of the facilities of Ant available within your build files. Gradle provides a simple extension to the existing Groovy AntBuilder which adds a simple yet powerful way to interface with existing Ant build files: the <em>importBuild(Object antBuildFile)<\/em> method. Internally this method utilizes an Ant ProjectHelper to parse the specified Ant build file and then wraps all of the targets in Gradle tasks making them available in the Gradle build. The following is a simple Ant build file used for illustration which contains some properties and a couple of dependent targets.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot;?&gt;\r\n&lt;project name=&quot;build&quot; default=&quot;all&quot;&gt;\r\n    &lt;echo&gt;Building ${ant.file}&lt;\/echo&gt;\r\n\r\n    &lt;property file=&quot;build.properties&quot;\/&gt;\r\n    &lt;property name=&quot;root.dir&quot; location=&quot;.&quot;\/&gt;\r\n\r\n    &lt;target name=&quot;dist&quot; description=&quot;Build the distribution&quot;&gt;\r\n        &lt;property name=&quot;dist.dir&quot; location=&quot;dist&quot;\/&gt;\r\n        &lt;echo&gt;dist.dir=${dist.dir}, foo=${foo}&lt;\/echo&gt;\r\n    &lt;\/target&gt;\r\n\r\n    &lt;target name=&quot;all&quot; description=&quot;Build everything&quot; depends=&quot;dist&quot;\/&gt;\r\n&lt;\/project&gt;\r\n\r\n<\/pre>\n<p>\nImporting this build file using Gradle is a one-liner.<br \/>\n<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\nant.importBuild('src\/main\/resources\/build.xml')\r\n<\/pre>\n<p>\nAnd the output of gradle tasks &#8211;all on the command line shows that the targets have been added to the build tasks.<br \/>\n<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\n$ gradle tasks --all\r\n...\r\nOther tasks\r\n-----------\r\nall - Build everything\r\n    dist - Build the distribution\r\n...\r\n<\/pre>\n<p>\nProperties used in the Ant build file can be specified in the Gradle build or on the command line and, unlike the usual Ant property behaviour, properties set by Ant or on the command line may be overwritten by Gradle. Given a simple build.properties file with <em>foo=bar<\/em> as the single entry, here&#8217;s a few combinations to demonstrate the override behaviour.<br \/>\n[table \u201c6\u201d not found \/]<br \/>\n<\/p>\n<h2>How to deal with task name clashes<\/h2>\n<p>Since Gradle insists on uniqueness of task names attempting to import an Ant build that contains a target with the same name as an existing Gradle task will fail. The most common clash I&#8217;ve encountered is with the <em>clean<\/em> task provided by the Gradle BasePlugin. With the help of a little bit of indirection we can still import and use any clashing targets by utilizing the GradleBuild task to bootstrap an Ant build import in an isolated Gradle project. Let&#8217;s add a new task to the mix in the Ant build imported and another dependency on the ant <em>clean<\/em> target to the <em>all<\/em> task. <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!-- excerpt from buildWithClean.xml Ant build file --&gt;\r\n    &lt;target name=&quot;clean&quot; description=&quot;clean up&quot;&gt;\r\n        &lt;echo&gt;Called clean task in ant build with foo = ${foo}&lt;\/echo&gt;\r\n    &lt;\/target&gt;\r\n    &lt;target name=&quot;all&quot; description=&quot;Build everything&quot; depends=&quot;dist,clean&quot;\/&gt;\r\n<\/pre>\n<p>And a simple Gradle build file which will handle the import.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\nant.importBuild('src\/main\/resources\/buildWithClean.xml')\r\n<\/pre>\n<p>Finally, in our main gradle build file we add a task to run the targets we want.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\ntask importTaskWithExistingName(type: GradleBuild) { GradleBuild antBuild -&gt;\r\n    antBuild.buildFile ='buildWithClean.gradle'\r\n    antBuild.tasks = &#x5B;'all']\r\n}\r\n<\/pre>\n<p>This works, but unfortunately suffers from <a href=\"http:\/\/issues.gradle.org\/browse\/GRADLE-427\">one small problem<\/a>. When Gradle is importing these tasks it doesn&#8217;t properly respect the declared order of the dependencies. Instead it executes the dependent ant targets in alphabetical order. In this particular case Ant expects to execute the <em>dist<\/em> target before <em>clean<\/em> and Gradle executes them in the reverse order. This can be worked around by explicitly stating the task order, definitely not ideal, but workable. This Gradle task will execute the  underlying Ant targets in the way we need.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\ntask importTasksRunInOrder(type: GradleBuild) { GradleBuild antBuild -&gt;\r\n    antBuild.buildFile ='buildWithClean.gradle'\r\n    antBuild.tasks = &#x5B;'dist', 'clean']\r\n}\r\n<\/pre>\n<h2>Gradle Rules for the rest<\/h2>\n<p>Finally, you can use a Gradle Rule to allow for calling any arbitrary target in a GradleBuild bootstrapped import.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\ntasks.addRule(&quot;Pattern: a-&lt;target&gt; will execute a single &lt;target&gt; in the ant build&quot;) { String taskName -&gt;\r\n    if (taskName.startsWith(&quot;a-&quot;)) {\r\n        task(taskName, type: GradleBuild) {\r\n            buildFile = 'buildWithClean.gradle'\r\n            tasks = &#x5B;taskName - 'a-']\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>In this particular example, this can allow you to string together calls as well, but be warned that they execute in completely segregated environments.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\n$ gradle a-dist a-clean\r\n<\/pre>\n<h2>Source code<\/h2>\n<p>All of code referenced in this article is <a href=\"https:\/\/github.com\/kellyrob99\/gradleAntImport\">available on github<\/a> if you&#8217;d like to take a closer look.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gradle provides several different ways to leverage your existing investment in Ant, both in terms of accumulated knowledge and the time you&#8217;ve already put into build files. This can greatly facilitate the process of porting Ant built projects over to Gradle, and can give you a path for incrementally doing so. The Gradle documentation does [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[6],"tags":[225,231,219,230,257,112,42,148,113],"class_list":["post-1422","post","type-post","status-publish","format-standard","hentry","category-dev","tag-ant","tag-antbuilder","tag-gradle","tag-gradlebuild","tag-groovy","tag-kellyrob99","tag-maven","tag-source-code","tag-thekaptain"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Gradle and Ant can work together cooperatively, and here are some examples to show you how.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"TheKaptain\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"The Kaptain on ... stuff | Tales of development, life and the folly that goes along with both\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff\" \/>\n\t\t<meta property=\"og:description\" content=\"Gradle and Ant can work together cooperatively, and here are some examples to show you how.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-09-18T20:44:11+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2011-09-18T20:44:11+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Gradle and Ant can work together cooperatively, and here are some examples to show you how.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#article\",\"name\":\"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff\",\"headline\":\"Using Gradle to Bootstrap your Legacy Ant Builds\",\"author\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-09-18T11:44:11-09:00\",\"dateModified\":\"2011-09-18T11:44:11-09:00\",\"inLanguage\":\"en-US\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#webpage\"},\"articleSection\":\"Development, Ant, AntBuilder, Gradle, GradleBuild, Groovy, kellyrob99, maven, Source code, theKaptain\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/category\\\/dev\\\/#listItem\",\"name\":\"Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/category\\\/dev\\\/#listItem\",\"position\":2,\"name\":\"Development\",\"item\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/category\\\/dev\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#listItem\",\"name\":\"Using Gradle to Bootstrap your Legacy Ant Builds\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#listItem\",\"position\":3,\"name\":\"Using Gradle to Bootstrap your Legacy Ant Builds\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/category\\\/dev\\\/#listItem\",\"name\":\"Development\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#organization\",\"name\":\"The Kaptain on ... stuff\",\"description\":\"Tales of development, life and the folly that goes along with both\",\"url\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"TheKaptain\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e41f09f3548f065fe6967ac904d3ea2a638614c16d879cac47cfad64e5b1426a?s=96&d=monsterid&r=g\",\"width\":96,\"height\":96,\"caption\":\"TheKaptain\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#webpage\",\"url\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/\",\"name\":\"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff\",\"description\":\"Gradle and Ant can work together cooperatively, and here are some examples to show you how.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2011\\\/09\\\/18\\\/using-gradle-to-bootstrap-your-legacy-ant-builds\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2011-09-18T11:44:11-09:00\",\"dateModified\":\"2011-09-18T11:44:11-09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/\",\"name\":\"The Kaptain on ... stuff\",\"description\":\"Tales of development, life and the folly that goes along with both\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff","description":"Gradle and Ant can work together cooperatively, and here are some examples to show you how.","canonical_url":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#article","name":"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff","headline":"Using Gradle to Bootstrap your Legacy Ant Builds","author":{"@id":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.kellyrob99.com\/blog\/#organization"},"datePublished":"2011-09-18T11:44:11-09:00","dateModified":"2011-09-18T11:44:11-09:00","inLanguage":"en-US","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#webpage"},"isPartOf":{"@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#webpage"},"articleSection":"Development, Ant, AntBuilder, Gradle, GradleBuild, Groovy, kellyrob99, maven, Source code, theKaptain"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.kellyrob99.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/#listItem","name":"Development"}},{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/#listItem","position":2,"name":"Development","item":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#listItem","name":"Using Gradle to Bootstrap your Legacy Ant Builds"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#listItem","position":3,"name":"Using Gradle to Bootstrap your Legacy Ant Builds","previousItem":{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/#listItem","name":"Development"}}]},{"@type":"Organization","@id":"https:\/\/www.kellyrob99.com\/blog\/#organization","name":"The Kaptain on ... stuff","description":"Tales of development, life and the folly that goes along with both","url":"https:\/\/www.kellyrob99.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/#author","url":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/","name":"TheKaptain","image":{"@type":"ImageObject","@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e41f09f3548f065fe6967ac904d3ea2a638614c16d879cac47cfad64e5b1426a?s=96&d=monsterid&r=g","width":96,"height":96,"caption":"TheKaptain"}},{"@type":"WebPage","@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#webpage","url":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/","name":"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff","description":"Gradle and Ant can work together cooperatively, and here are some examples to show you how.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.kellyrob99.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/#breadcrumblist"},"author":{"@id":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/#author"},"datePublished":"2011-09-18T11:44:11-09:00","dateModified":"2011-09-18T11:44:11-09:00"},{"@type":"WebSite","@id":"https:\/\/www.kellyrob99.com\/blog\/#website","url":"https:\/\/www.kellyrob99.com\/blog\/","name":"The Kaptain on ... stuff","description":"Tales of development, life and the folly that goes along with both","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.kellyrob99.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"The Kaptain on ... stuff | Tales of development, life and the folly that goes along with both","og:type":"article","og:title":"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff","og:description":"Gradle and Ant can work together cooperatively, and here are some examples to show you how.","og:url":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/","article:published_time":"2011-09-18T20:44:11+00:00","article:modified_time":"2011-09-18T20:44:11+00:00","twitter:card":"summary","twitter:title":"Using Gradle to Bootstrap your Legacy Ant Builds | The Kaptain on ... stuff","twitter:description":"Gradle and Ant can work together cooperatively, and here are some examples to show you how."},"aioseo_meta_data":{"post_id":"1422","title":"Using Gradle to Bootstrap your Legacy Ant Builds | #site_title","description":"Gradle and Ant can work together cooperatively, and here are some examples to show you how.","keywords":[{"label":"Ant","value":"Ant"},{"label":"AntBuilder","value":"AntBuilder"},{"label":"Gradle","value":"Gradle"},{"label":"GradleBuild","value":"GradleBuild"},{"label":"Groovy","value":"Groovy"},{"label":"kellyrob99","value":"kellyrob99"},{"label":"maven","value":"maven"},{"label":"Source code","value":"Source code"},{"label":"theKaptain","value":"theKaptain"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-02-09 05:15:21","updated":"2025-11-29 20:28:39","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.kellyrob99.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/\" title=\"Development\">Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUsing Gradle to Bootstrap your Legacy Ant Builds\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.kellyrob99.com\/blog"},{"label":"Development","link":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/"},{"label":"Using Gradle to Bootstrap your Legacy Ant Builds","link":"https:\/\/www.kellyrob99.com\/blog\/2011\/09\/18\/using-gradle-to-bootstrap-your-legacy-ant-builds\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/prjtg-mW","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/1422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/comments?post=1422"}],"version-history":[{"count":43,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/1422\/revisions"}],"predecessor-version":[{"id":1749,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/1422\/revisions\/1749"}],"wp:attachment":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/media?parent=1422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/categories?post=1422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/tags?post=1422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}