{"id":21726960,"url":"https://github.com/wttech/gradle-config-plugin","last_synced_at":"2025-06-15T15:05:44.877Z","repository":{"id":62175912,"uuid":"542640409","full_name":"wttech/gradle-config-plugin","owner":"wttech","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-18T08:38:11.000Z","size":1015,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-25T19:42:12.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/wttech.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-28T14:44:21.000Z","updated_at":"2023-02-08T10:35:20.000Z","dependencies_parsed_at":"2025-01-25T19:41:34.128Z","dependency_job_id":"1c78655c-f875-465e-ac65-41c6a93ec7a2","html_url":"https://github.com/wttech/gradle-config-plugin","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wttech%2Fgradle-config-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wttech%2Fgradle-config-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wttech%2Fgradle-config-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wttech%2Fgradle-config-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wttech","download_url":"https://codeload.github.com/wttech/gradle-config-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244706537,"owners_count":20496571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-26T03:42:26.226Z","updated_at":"2025-03-20T23:14:27.048Z","avatar_url":"https://github.com/wttech.png","language":"Kotlin","readme":"[![WTT logo](docs/wtt-logo.png)](https://www.wundermanthompson.com/service/technology)\n\n[![Apache License, Version 2.0, January 2004](docs/apache-license-badge.svg)](http://www.apache.org/licenses/)\n\n# Gradle Config Plugin\n\n## About\n\nInstead of asking build users to write magic and hard-to-remember CLI options like `-PpropName=propValue`... how about just requesting input values using GUI?\n\nPlugin handles defining configuration for Gradle via DSL with ability to capture values using multiple input modes:\n\n- human friendly GUI (Mac and Window users): `sh gradlew config --gui`\n- fallback CLI (e.g for Windows \u0026 WSL): `sh gradlew config --cli`\n- static file (e.g on CI/CD systems): `sh gradlew config --file path/to/input.\u003cyml|json\u003e`\n\nOther concepts / features:\n\n- super flexible everything (things could be configured by functions/lambdas)\n- two-way binding between properties source values and between properties rendered on the dialog\n- easily accessible values by the Gradle build - `config[\"propName\"]`\n- programmable visibility and enablement of property groups and fields\n- programmable default values provided to the build even if input is not yet captured\n- programmable validation\n- providing filtered values to be read by other tools (Terraform/Packer TF vars, Ansible, etc).\n\n### Example screenshot\n\n![Showcase](docs/showcase.png)\n\n### Example usage\n\n```kotlin\nplugins {\n    id(\"io.wttech.config\")\n}\n\nconfig {\n    define {\n        label(\"GAT configuration\")\n\n        valueSaveVisible()\n        labelAbbrs(\"aem\")\n\n        group(\"general\") {\n            description(\"Infrastructure and environment type selection\")\n            prop(\"infra\") {\n                value(\"aws\")\n                options(\"local\", \"aws\", \"gcp\", \"az\", \"vagrant\")\n            }\n            prop(\"envType\") {\n                options(\"afe_single\", \"aem_single\", \"aem_multi\")\n                visible { otherValue(\"infra\") !in listOf(\"local\", \"vagrant\")}\n                validate { \"Not supported on selected infra\".takeIf { groups.get().none { it.name == \"remote-${otherValue(\"infra\")}_${value()}\" } } }\n            }\n            dynamicProp(\"domain\") { \"gat-${otherValue(\"infra\")}.wttech.cloud\" }\n        }\n        group(\"local\") {\n            label(\"Local Env\")\n            description(\"Environment set up directly on current machine\")\n            visible { value(\"infra\") == name }\n\n            prop(\"monitoringEnabled\") {\n                options(\"true\", \"false\")\n                checkbox()\n            }\n        }\n        group(\"remote-aws_afe_single\") {\n            label(\"Remote Env\")\n            description(\"Dedicated env for AFE app deployed on AWS infra\")\n            visible { name == \"remote-${value(\"infra\")}_${value(\"envType\")}\" }\n\n            prop(\"env\") {\n                value(\"kp\")\n                alphanumeric()\n            }\n            prop(\"envMode\") {\n                options(\"dev\", \"stg\", \"prod\")\n                description(\"Controls AEM run mode\")\n                enabled { otherStringValue(\"env\") == \"kp\" }\n            }\n            prop(\"aemInstancePassword\") {\n                valueDynamic { otherStringValue(\"env\")?.takeIf { it.isNotBlank() }?.let { \"$it-pass\" } }\n                description(\"Needed to access AEM admin (author \u0026 publish)\")\n                required()\n            }\n            prop(\"aemProxyPassword\") {\n                value(\"admin\")\n                description(\"Needed to access AEM dispatcher pages\")\n                required()\n            }\n            listProp(\"aemPackages\") {\n                values(\"a\", \"b\", \"c\")\n            }\n        }\n        group(\"app\") {\n            description(\"Application build settings\")\n            prop(\"mavenArgs\") {\n                value(\"-DskipTests\")\n            }\n        }\n        group(\"test\") {\n            description(\"Automated tests execution settings\")\n            prop(\"percyToken\")\n            prop(\"percyEnabled\") {\n                checkbox()\n            }\n            dynamicProp(\"testBaseUrl\") {\n                when (otherStringValue(\"infra\")) {\n                    \"local\" -\u003e \"https://publish.local.gat.com\"\n                    else -\u003e \"https://${otherValue(\"env\")}.${otherValue(\"domain\")}\"\n                }\n            }\n        }\n    }\n}\n\ntasks {\n    register(\"printAemInstancePassword\") {\n        doLast {\n            println(config[\"aemInstancePassword\"])\n        }\n    }\n}\n```\n\n## Debugging tests\n\nTo debug plugin source code while:\n\n* running functional tests, append `--debug-jvm -Porg.gradle.testkit.debug=true`.\n* project using plugin, append `--no-daemon -Dorg.gradle.debug=true`.\n\nGradle will stop for a moment and wait until remote connection at port 5005 will be established from e.g IDE.\n\n## Contributing\n\nIssues reported or pull requests created will be very appreciated. \n\n1. Fork plugin source code using a dedicated GitHub button.\n2. Do code changes on a feature branch created from *develop* branch.\n3. Create a pull request with a base of *develop* branch.\n\n## License\n\n**Gradle AEM Plugin** is licensed under the [Apache License, Version 2.0 (the \"License\")](https://www.apache.org/licenses/LICENSE-2.0.txt)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwttech%2Fgradle-config-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwttech%2Fgradle-config-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwttech%2Fgradle-config-plugin/lists"}