{"id":37020919,"url":"https://github.com/bbobcik/auderis-gradle-tools","last_synced_at":"2026-01-14T02:27:10.458Z","repository":{"id":57730116,"uuid":"62535516","full_name":"bbobcik/auderis-gradle-tools","owner":"bbobcik","description":"Small additions for Gradle build system","archived":false,"fork":false,"pushed_at":"2017-05-12T03:16:30.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T09:49:28.192Z","etag":null,"topics":["build-configuration","gradle","gradle-plugin","semantic-versioning","test-support"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbobcik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-04T06:02:48.000Z","updated_at":"2017-05-11T03:21:59.000Z","dependencies_parsed_at":"2022-09-08T00:21:39.052Z","dependency_job_id":null,"html_url":"https://github.com/bbobcik/auderis-gradle-tools","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bbobcik/auderis-gradle-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbobcik%2Fauderis-gradle-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbobcik%2Fauderis-gradle-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbobcik%2Fauderis-gradle-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbobcik%2Fauderis-gradle-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbobcik","download_url":"https://codeload.github.com/bbobcik/auderis-gradle-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbobcik%2Fauderis-gradle-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-configuration","gradle","gradle-plugin","semantic-versioning","test-support"],"created_at":"2026-01-14T02:27:09.774Z","updated_at":"2026-01-14T02:27:10.442Z","avatar_url":"https://github.com/bbobcik.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auderis-gradle-tools \u0026mdash; Build system improvements\nSmall but useful additions for Gradle build system.\n\nKeywords: `Gradle`, `plugin`, `semantic versioning`, `test support`\n\n[![Build Status](https://travis-ci.org/bbobcik/auderis-gradle-tools.svg?branch=master)](https://travis-ci.org/bbobcik/auderis-gradle-tools)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/cz.auderis/auderis-gradle-tools/badge.svg)](https://maven-badges.herokuapp.com/maven-central/cz.auderis/auderis-gradle-tools)\n\n\n## Changelog\n\n### 2.0.0\n  * Semantic versioning mechanism improved\n\n### 1.0.1 \n  * `SemanticVersion` class added\n  * Build system change (Gradle instead of Maven)\n\n### 1.0.0 Initial release\n  * Test support plugin introduced\n\n## Test Support Plugin\n\n*Motivation:* Typically, software projects focus only on production code part, occasionally a test part\nis included, too. However support for library objects' testing/validation in client environment is - as it\nseems - a novel idea, which leads to a too common \"reinventing the wheel\". Basically, a developer who wants\nto perform certain tests (also known as *assertions*) on library's objects is left to his own devices, which\nresults in reader-unfriendly, cumbersome assertion constructs. Compare the following test code:\n\n```\n    Customer customer = ...\n    assertNotNull( customer.getLastOrder() );\n    assertTrue( !customer.getLastOrder().isClosed() );\n```\n\nwith alternative\n \n```\n    Customer customer = ...\n    assertThat( customer, hasLastOrderOpen() );\n```\n      \nThe difference is that author of the hypothetical `Customer` class spend some time providing an appropriate Hamcrest\nmatcher for a certain property (of course provided that the usefulness of the property warrants a dedicated matcher).\n\nObviously, the matchers and other components supporting tests must be published to be useful outside of their project,\nbut their inclusion into a production code bundle is deemed a bad design. **The solution and the raison d'etre of this\nplugin is an idea that a library-type project should have 3 parts:**\n\n  * `src/main`: the library with production code\n  * `src/test-support`: a module that facilitates unit testing of the project's objects in a client environment,\n    e.g. Hamcrest matchers, JavaBeans property editors, JUnitParams annotations and converters etc. \n  * `src/test`: normal unit test code that has access to both production and test-support code\n  \nOf the mentioned 3 project parts, the library itself and the test support module would be published as artifacts.\nThe test support is distinguished by having artifact filename \"appendix\" set to `test_support`.\nFor example, the produced artifacts of a \"FooBar\" project would be:\n\n  * Production: `foobar-1.0.0.jar`\n  * Test support: `foobar-test_support-1.0.0.jar`\n\nPlugin usage\n\n```gradle\n    // build.gradle\n    buildscript {\n        // Define where to find the plugin module, e.g. mavenCentral()\n    }\n    apply plugin: 'cz.auderis.TestSupport'\n    \n    dependencies {\n        ...\n        testSupportCompile 'org.hamcrest:hamcrest-all:1.3'\n        ...\n    }\n```\n\n## Semantic versioning\n\nAs specified in Gradle documentation, project/module version may be an object of any type. Gradle uses its\n`toString()` to obtain the version string. However often there is a need for other, more detailed inspection\nof version number structure.\n\nWhen adopting [Semantic Versioning](http://http://semver.org/) approach, a convenient class is made available\nby this library for Gradle scripts. The version may be defined either directly in the script or loaded from\nan external resource, such as a file or even URL. \n\n```gradle\n    import cz.auderis.tools.gradle.semver.SemanticVersion\n\n    // build.gradle\n    buildscript {\n        // Define where to find the plugin module, e.g. mavenCentral()\n    }\n    \n    // Use direct specification\n    project.version = SemanticVersion.is(\"1.0.0-SNAPSHOT\")\n    \n    // Load version specification from a file\n    project version = SemanticVersion.from(\"version.txt\")\n```\n\nAn instance of `SemanticVersion` class has, among others, the following properties:\n\n  * `majorVersion` (with convenient alias `major`) returns first numeric part X from version X.Y.Z\n  * `minorVersion` (with convenient alias `minor`) returns numeric part Y from version X.Y.Z\n  * `patchRevision` (with convenient aliases `patch` and `patchLevel`) returns numeric part Z from version X.Y.Z\n  * `prerelease` is a boolean flag that indicates that either major version is 0 or there are pre-release identifiers\n    present (part P in version string X.Y.Z-P). There is an alias `preRelease` available as well.\n  * `stable` is a boolean flag that is effectively a negation of `prerelease` property\n  * `snapshot` is a boolean flag that indicates whether a special pre-release ID `SNAPSHOT` is present\n    in the version string (i.e. \"1.4.2-SNAPSHOT\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbobcik%2Fauderis-gradle-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbobcik%2Fauderis-gradle-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbobcik%2Fauderis-gradle-tools/lists"}