{"id":20966,"date":"2014-01-23T19:00:27","date_gmt":"2014-01-23T17:00:27","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=20966"},"modified":"2014-01-23T07:59:11","modified_gmt":"2014-01-23T05:59:11","slug":"specifying-gradle-build-properties","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html","title":{"rendered":"Specifying Gradle Build Properties"},"content":{"rendered":"<p><a href=\"http:\/\/www.gradle.org\/docs\/current\/userguide\/userguide_single.html#sec:extra_task_properties\">Properties<\/a> are a valuable tool for easily customizing <a href=\"http:\/\/www.gradle.org\/\">Gradle<\/a> builds and the <a href=\"http:\/\/www.gradle.org\/docs\/current\/userguide\/build_environment.html#sec:gradle_configuration_properties\">Gradle environment<\/a>. I demonstrate some of these approaches for specifying properties used in a <a href=\"http:\/\/www.gradle.org\/docs\/current\/userguide\/userguide_single.html\">Gradle<\/a> build in this post.<\/p>\n<p>Gradle supports both <em>project properties<\/em> and <em>system properties<\/em>. The main difference between the two that is of interest in this post is how each is accessed. Project properties are more conducive to direct access by name while system properties are accessed via normal Java\/Groovy system properties access methods.<\/p>\n<h2>Passing Project Properties from Command-Line with -P<\/h2>\n<p>One of the easiest approaches for passing properties to a Gradle build is to specify project properties with <a href=\"http:\/\/www.gradle.org\/docs\/current\/userguide\/tutorial_this_and_that.html#sec:gradle_properties_and_system_properties\">-P<\/a> from the command line. Properties passed into the build with <code>-P<\/code> are readily accessible in the build as project properties and, if their naming structure allows, can be accessed directly like variables.<\/p>\n<h2>Passing System Properties from Command-Line with -D<\/h2>\n<p>As is the case with other Java applications, one can pass system properties to Gradle builds with <a href=\"http:\/\/www.coderanch.com\/t\/178539\/java-SCJA\/certification\/java-command-line-option-good\">-D<\/a>. Although these system properties provided to the Gradle build via the <code>-D<\/code> option are always available to the Gradle build via the <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/System.html#getProperties()\">normal Java mechanism for obtaining system properties<\/a>, Gradle makes it possible to specify Project Properties as system properties. This is done by placing the prefix <code>org.gradle.project.<\/code> before the name of the property desired in the build. For example, if one wanted to specify a system property named <code>name.first<\/code> with <code>-D<\/code> that would be available to the Gradle build as if it was provided with <code>-P<\/code>, the person could provide it to the Gradle build on the command line as <code>org.gradle.project.<b>name.first<\/b><\/code> and the Gradle build would see it as a project property named <code>name.first<\/code>.<\/p>\n<h2>Passing System Properties via Environmental Variable<\/h2>\n<p>Any Java or Groovy application (including a Gradle build) can access environmental variables via <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/System.html#getenv(java.lang.String)\">System.getenv(String)<\/a>. However, Gradle allows environment variables to be accessed within the build like other project properties if the environmental variable is prefixed with <code>ORG_GRADLE_PROJECT_<\/code>. For example, if one wanted a project property in the Gradle build to be called <code>name.last<\/code> and wanted to supply it to the build via environment variable, that person could declare the environment variable <code>ORG_GRADLE_PROJECT_name.last<\/code> and its value would be available to the Gradle build as a project property with name <code>name.last<\/code>.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h2>gradle.properties<\/h2>\n<p>Properties can also be provided to a Gradle build via a properties file named <code>gradle.properties<\/code>. Any properties specified with <code>systemProp.<\/code> at the beginning of their property name are seen as system properties in the Gradle build and other properties (without their names beginning with &#8220;systemProp.&#8221;) are seen as Gradle project properties. For example, if my gradle.properties file had a property <code>name.last=Marx<\/code> and a property <code>systemPropr.name.first=Dustin<\/code>, the <code>name.last<\/code> property would be seen and accessed in the Gradle build like any project property while the <code>name.first<\/code> property would be seen and accessed in the Gradle build like any system property.<\/p>\n<h2>Demonstration \/ Example<\/h2>\n<p>Each of these types of properties-specifying mechanisms can be demonstrated with a simple example. The Gradle build shown next attempts to print out various properties that are specified in different ways.<\/p>\n<h4>build-properties.gradle<\/h4>\n<pre class=\" brush:java\">task displayProperties &lt;&lt; {\r\n   displaySystemProperties()\r\n   displayGradleProjectProperties()\r\n}\r\n\r\ndef displaySystemProperties()\r\n{\r\n   println \"\\n=== System Properties ===\"\r\n   println \"Favorite Movie (1994): ${System.properties['movie.favorite.1994']}\"\r\n   println \"Favorite Movie (1996): ${System.properties['movie.favorite.1996']}\" \r\n   println \"Favorite Movie (1997): ${System.properties['movie.favorite.1997']}\"\r\n   println \"Favorite Movie (1981): ${System.properties['movie.favorite.1981']}\"\r\n   println \"Favorite Movie (2012): ${System.properties['movie.favorite.2012']}\"\r\n   println \"Favorite Movie (2013): ${System.properties['movie.favorite.2013']}\"\r\n}\r\n\r\ndef displayGradleProjectProperties()\r\n{\r\n   println \"\\n=== Gradle Project Properties ===\"\r\n   println \"Favorite Movie (1994): ${getProjectProperty('movie.favorite.1994')}\"\r\n   println \"Favorite Movie (1996): ${getProjectProperty('movie.favorite.1996')}\"\r\n   println \"Favorite Movie (1997): ${getProjectProperty('movie.favorite.1997')}\"\r\n   println \"Favorite Movie (1981): ${getProjectProperty('movie.favorite.1981')}\"\r\n   println \"Favorite Movie (2012): ${getProjectProperty('movie.favorite.2012')}\"\r\n   println \"Favorite Movie (2013): ${getProjectProperty('movie.favorite.2013')}\"\r\n}\r\n\r\ndef String getProjectProperty(String propertyName)\r\n{\r\n   String movieTitle = \"null\"\r\n   if (hasProperty(propertyName))\r\n   {\r\n      movieTitle = this.properties[propertyName]\r\n   }\r\n   return movieTitle\r\n}<\/pre>\n<p>Some of the properties to be passed to this script will be provided on the command-line with <code>-P<\/code>, some will be provided on the command line with <code>-D<\/code>, one will be provided via environment variable, and two will be provided via <code>gradle.properties<\/code> file in the same directory as the build. That <code>gradle.properties<\/code> file is shown next.<\/p>\n<h4>gradle.properties<\/h4>\n<pre class=\" brush:java\">movie.favorite.2013=Star Trek into Darkness\r\nsystemProp.movie.favorite.2012=Skyfall<\/pre>\n<p>With the <code>gradle.properties<\/code> file in place, the other two interesting parts of the example are the setting of the environment variable. The example here is in DOS, but the same thing could be done with slightly different syntax in Linux environments. The DOS\/Windows command is: <code>set ORG_GRADLE_PROJECT.movie.favorite.1981=\"Raiders of the Lost Ark\"<\/code><\/p>\n<p>For this demonstration, I&#8217;ll run the Gradle build script with <code>-D<\/code> and <code>-P<\/code> parameters: <code>gradle -b build-properties.gradle displayProperties -Pmovie.favorite.1996=\"Independence Day\" -Dmovie.favorite.1997=Gattaca -Dorg.gradle.project.movie.favorite.1994=\"Shawshank Redemption\" <\/code><\/p>\n<p>When running the above-listed Gradle build script with the indicated <code>gradle.properties<\/code> file in place, with the indicated environment variable specified, and with the command just shown, the output looks that shown in the next screen snapshot.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/gradlePropertiesProjectSystemEnvironmentalVariable.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-20981\" alt=\"gradlePropertiesProjectSystemEnvironmentalVariable\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/gradlePropertiesProjectSystemEnvironmentalVariable.png\" width=\"677\" height=\"400\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/gradlePropertiesProjectSystemEnvironmentalVariable.png 677w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/gradlePropertiesProjectSystemEnvironmentalVariable-300x177.png 300w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><\/a><\/p>\n<p>The screen snapshot indicates how properties are seen\/accessed in the Gradle build depending on their source and naming convention. In short, the output demonstrates the following &#8220;rules&#8221; of property availability in a Gradle build:<\/p>\n<ul>\n<li>Command-line <code>-P<\/code> properties are &#8220;project properties&#8221;<\/li>\n<li>Command-line <code>-D<\/code> properties are, with one exception, &#8220;system properties&#8221;<\/li>\n<li>Command-line <code>-D<\/code> properties that begin with <code>org.gradle.project.<\/code> are &#8220;project properties&#8221;<\/li>\n<li>Properties specified in <code>gradle.properties<\/code> are, with one exception, &#8220;project properties&#8221;<\/li>\n<li>Properties specified in <code>gradle.properties<\/code> that begin with <code>systemProp.<\/code> are &#8220;system properties&#8221;<\/li>\n<li>Properties specified via environment variable are, with one exception, &#8220;system properties&#8221;<\/li>\n<li>Properties specified via environment variables that begin with <code>ORG_GRADLE_PROJECT_<\/code> are &#8220;project properties&#8221;<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>Gradle provides numerous approaches for specifying properties that can be used to customize the Gradle build.<br \/>\n&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/marxsoftware.blogspot.com\/2014\/01\/specifying-gradle-build-properties.html\">Specifying Gradle Build Properties<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Dustin Marx at the <a href=\"http:\/\/marxsoftware.blogspot.com\/\">Inspired by Actual Events <\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Properties are a valuable tool for easily customizing Gradle builds and the Gradle environment. I demonstrate some of these approaches for specifying properties used in a Gradle build in this post. Gradle supports both project properties and system properties. The main difference between the two that is of interest in this post is how each &hellip;<\/p>\n","protected":false},"author":122,"featured_media":129,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[484],"class_list":["post-20966","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-gradle"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Specifying Gradle Build Properties<\/title>\n<meta name=\"description\" content=\"Properties are a valuable tool for easily customizing Gradle builds and the Gradle environment. I demonstrate some of these approaches for specifying\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Specifying Gradle Build Properties\" \/>\n<meta property=\"og:description\" content=\"Properties are a valuable tool for easily customizing Gradle builds and the Gradle environment. I demonstrate some of these approaches for specifying\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-01-23T17:00:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Dustin Marx\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dustin Marx\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html\"},\"author\":{\"name\":\"Dustin Marx\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/945db7c24d37de80481570a5643f7958\"},\"headline\":\"Specifying Gradle Build Properties\",\"datePublished\":\"2014-01-23T17:00:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html\"},\"wordCount\":777,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/gradle-logo.jpg\",\"keywords\":[\"Gradle\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html\",\"name\":\"Specifying Gradle Build Properties\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/gradle-logo.jpg\",\"datePublished\":\"2014-01-23T17:00:27+00:00\",\"description\":\"Properties are a valuable tool for easily customizing Gradle builds and the Gradle environment. I demonstrate some of these approaches for specifying\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/gradle-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/gradle-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/specifying-gradle-build-properties.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Specifying Gradle Build Properties\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/945db7c24d37de80481570a5643f7958\",\"name\":\"Dustin Marx\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g\",\"caption\":\"Dustin Marx\"},\"sameAs\":[\"http:\\\/\\\/marxsoftware.blogspot.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Dustin-Marx\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Specifying Gradle Build Properties","description":"Properties are a valuable tool for easily customizing Gradle builds and the Gradle environment. I demonstrate some of these approaches for specifying","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html","og_locale":"en_US","og_type":"article","og_title":"Specifying Gradle Build Properties","og_description":"Properties are a valuable tool for easily customizing Gradle builds and the Gradle environment. I demonstrate some of these approaches for specifying","og_url":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-01-23T17:00:27+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","type":"image\/jpeg"}],"author":"Dustin Marx","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Dustin Marx","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html"},"author":{"name":"Dustin Marx","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/945db7c24d37de80481570a5643f7958"},"headline":"Specifying Gradle Build Properties","datePublished":"2014-01-23T17:00:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html"},"wordCount":777,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","keywords":["Gradle"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html","url":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html","name":"Specifying Gradle Build Properties","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","datePublished":"2014-01-23T17:00:27+00:00","description":"Properties are a valuable tool for easily customizing Gradle builds and the Gradle environment. I demonstrate some of these approaches for specifying","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/specifying-gradle-build-properties.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Specifying Gradle Build Properties"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/945db7c24d37de80481570a5643f7958","name":"Dustin Marx","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g","caption":"Dustin Marx"},"sameAs":["http:\/\/marxsoftware.blogspot.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Dustin-Marx"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/20966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/122"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=20966"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/20966\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/129"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=20966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=20966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=20966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}