{"id":22006342,"url":"https://github.com/a-sit-plus/gradle-conventions-plugin","last_synced_at":"2026-05-13T12:31:43.252Z","repository":{"id":181775957,"uuid":"655270657","full_name":"a-sit-plus/gradle-conventions-plugin","owner":"a-sit-plus","description":"A-SIT Plus Gradle Conventions","archived":false,"fork":false,"pushed_at":"2025-05-06T17:09:51.000Z","size":5467,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T18:25:16.738Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/a-sit-plus/gradle-conventions-plugin/blob/main/CHANGELOG.md","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/a-sit-plus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2023-06-18T12:05:49.000Z","updated_at":"2025-05-06T17:07:47.000Z","dependencies_parsed_at":"2023-07-17T08:45:06.741Z","dependency_job_id":"a84c2117-466e-49d2-831b-a135076a9c7c","html_url":"https://github.com/a-sit-plus/gradle-conventions-plugin","commit_stats":null,"previous_names":["a-sit-plus/gradle-conventions-plugin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/a-sit-plus/gradle-conventions-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sit-plus%2Fgradle-conventions-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sit-plus%2Fgradle-conventions-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sit-plus%2Fgradle-conventions-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sit-plus%2Fgradle-conventions-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-sit-plus","download_url":"https://codeload.github.com/a-sit-plus/gradle-conventions-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sit-plus%2Fgradle-conventions-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261808046,"owners_count":23212686,"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-30T01:11:38.507Z","updated_at":"2026-05-13T12:31:43.239Z","avatar_url":"https://github.com/a-sit-plus.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A-SIT Plus Gradle Conventions Plugin\n\n\u003cdiv align=\"center\"\u003e\n\n![Version](https://img.shields.io/badge/version-20260428-blue.svg?style=flat\u0026logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNDMuNzYyODYgMTg0LjgxOTk5Ij48ZGVmcz48Y2xpcFBhdGggaWQ9ImEiIGNsaXBQYXRoVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48cGF0aCBkPSJNMCA1OTUuMjhoODQxLjg5VjBIMFoiLz48L2NsaXBQYXRoPjwvZGVmcz48ZyBjbGlwLXBhdGg9InVybCgjYSkiIHRyYW5zZm9ybT0ibWF0cml4KDEuMzMzMzMzMyAwIDAgLTEuMzMzMzMzMyAtNDgyLjI1IDUxNy41MykiPjxwYXRoIGZpbGw9IiMwMDViNzkiIGQ9Ik00MTUuNjcgMjQ5LjUzYy03LjE1LjA4LTEzLjk0IDEtMjAuMTcgMi43NWE1Mi4zMyA1Mi4zMyAwIDAgMC0xNy40OCA4LjQ2IDQwLjQzIDQwLjQzIDAgMCAwLTExLjk2IDE0LjU2Yy0yLjY4IDUuNDEtNC4xNCAxMS44NC00LjM1IDE5LjA5bC0uMDIgNi4xMnYyLjE3YS43MS43MSAwIDAgMCAuNy43M2gxNi41MmMuMzkgMCAuNy0uMzIuNzEtLjdsLjAxLTIuMmMwLTIuNi4wMi01LjgyLjAzLTYuMDcuMi00LjYgMS4yNC04LjY2IDMuMDgtMTIuMDZhMjguNTIgMjguNTIgMCAwIDEgOC4yMy05LjU4IDM1LjI1IDM1LjI1IDAgMCAxIDExLjk2LTUuNTggNTUuMzggNTUuMzggMCAwIDEgMTIuNTgtMS43NmM0LjMyLjEgOC42LjcgMTIuNzQgMS44YTM1LjA3IDM1LjA3IDAgMCAxIDExLjk2IDUuNTcgMjguNTQgMjguNTQgMCAwIDEgOC4yNCA5LjU3YzEuOTYgMy42NCAzIDguMDIgMy4xMiAxMy4wMnYyNC4wOUgzNjIuNGEuNy43IDAgMCAwLS43MS43VjMzNWMwIDguNDMuMDEgOC4wNS4wMSA4LjE0LjIgNy4zIDEuNjcgMTMuNzcgNC4zNiAxOS4yMmE0MC40MyA0MC40MyAwIDAgMCAxMS45NiAxNC41N2M1IDMuNzYgMTAuODcgNi42MSAxNy40OCA4LjQ2YTc3LjUgNzcuNSAwIDAgMCAyMC4wMiAyLjc3YzcuMTUtLjA3IDEzLjk0LTEgMjAuMTctMi43NGE1Mi4zIDUyLjMgMCAwIDAgMTcuNDgtOC40NiA0MC40IDQwLjQgMCAwIDAgMTEuOTUtMTQuNTdjMS42Mi0zLjI2IDMuNzctMTAuMDQgMy43Ny0xNC42OCAwLS4zOC0uMTctLjc0LS41NC0uODJsLTE2Ljg5LS40Yy0uMi0uMDQtLjM0LjM0LS4zNC41NCAwIC4yNy0uMDMuNC0uMDYuNi0uNSAyLjgyLTEuMzggNS40LTIuNjEgNy42OWEyOC41MyAyOC41MyAwIDAgMS04LjI0IDkuNTggMzUuMDEgMzUuMDEgMCAwIDEtMTEuOTYgNS41NyA1NS4yNSA1NS4yNSAwIDAgMS0xMi41NyAxLjc3Yy00LjMyLS4xLTguNjEtLjcxLTEyLjc1LTEuOGEzNS4wNSAzNS4wNSAwIDAgMS0xMS45Ni01LjU3IDI4LjUyIDI4LjUyIDAgMCAxLTguMjMtOS41OGMtMS44Ni0zLjQ0LTIuOS03LjU1LTMuMDktMTIuMmwtLjAxLTcuNDdoODkuMTZhLjcuNyAwIDAgMCAuNy0uNzJ2LTM5LjVjLS4xLTcuNjUtMS41OC0xNC40LTQuMzgtMjAuMDZhNDAuNCA0MC40IDAgMCAwLTExLjk1LTE0LjU2IDUyLjM3IDUyLjM3IDAgMCAwLTE3LjQ4LTguNDcgNzcuNTYgNzcuNTYgMCAwIDAtMjAuMDEtMi43N1oiLz48cGF0aCBmaWxsPSIjY2U0OTJlIiBkPSJNNDE5LjM4IDI4MC42M2gtNy41N2EuNy43IDAgMCAwLS43MS43MXYxNS40MmE4LjE3IDguMTcgMCAwIDAtMy43OCA2LjkgOC4yOCA4LjI4IDAgMCAwIDE2LjU0IDAgOC4yOSA4LjI5IDAgMCAwLTMuNzYtNi45di0xNS40MmEuNy43IDAgMCAwLS43Mi0uNzEiLz48L2c%2BPC9zdmc%2B\u0026labelColor=white)\n[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-brightgreen.svg?style=flat\u0026)](http://www.apache.org/licenses/LICENSE-2.0)\n\n\u003c/div\u003e\n\n**Note: This plugin is used internally at A-SIT Plus and there are no guarantees whatsoever wrt. stability, reliability, and even making any sense at all.\nIt may eat your cat! Hopefully, though, it won't, but will instead help others understand some of the intricacies when writing custom plugins.\n\u003cbr\u003e\nMinimum supported Gradle version: 8.5. Requires Java 17+!**\n\nThis repository bundles conventions used inside A-SIT Plus into a plugin.\nThe main motivation to go beyond a versions catalogue was re-usability inside complex, nested composite builds.\nGradle version catalogues are great, they can only get you so far…\n\nThis plugin targets Kotlin JVM and multiplatform projects and provides the following functionality:\n\n* Version management of core libraries, Dokka, ~~Kotlin~~, certain Kotlin plugins, Gradle Ktor Plugin (and ktor libraries),\n  ~~KSP plugin~~, and JVM toolchain (can be overridden)\n* Shorthands for various commonly-used dependencies\n* Natural extension functions to add common dependencies\n* Automatically adding of Google and maven central repository\n* Auto-setup of gradle-nexus-plugin (but no configuration of publishing)\n* Experimental opt-ins for multiplatform projects\n* Gitlab publishing shorthands\n* Shorthand to publish an iOS Framework\n* Support for storing extra properties in `local.properties` as known from the Android Gradle Plugin\n* Compatible with Android Gradle Plugin\n* Introduction of a `clean` task to the root project\n* Auto-apply `idea` plugin to root project and set JDK name in accordance with JVM target\n* Autoconfiguration of test output format\n* Force dependency from publish tasks to sign tasks\n* Shorthand for Dokka setup\n* Shorthand for accessing environment variables:\n    * `val my_env_prop by env` creates a final `String?` variable, set to the value\n      of `System.getProperty(\"my_env_prop\")`\n    * `env(\"my.prop\")` is a shorthand for `System.getProperty(\"my.prop\")`\n    * `val my_env_overridable_prop by envExtra` is a shorthand for first\n      trying `System.getProperty(\"my_env_overridable_prop\")`, then trying to read from `extra`. Returns `null`\n      if absent.\n* Automatic compilation and publication of Gradle version catalog for all non-test dependencies\n  * Can be disabled by setting `publishVersionCatalog = false` in a module's `build.gradle.kts`\n\n**Do read the section on JDK version management!**\n\nThis plugin is hosted on a public GitHub repo, because a) some of our publicly published projects depend on it and b)\nsharing is caring!\nWe hope that this plugin can also help other seeking to streamline build processes across multiple projects following a\ncommon set of conventions.\n\n## Adding the Plugin\n\nYou can add this plugin to your project using one of two ways: either add it as part of a composite build or include the\nmaven repository hosted in this GitHub repo. Then apply the plugin in your Gradle root project.\n\n### Adding the plugin as part of a composite build\n\nAdd this repository as a git submodule to your project, then add the following to `settings.gradle.kts`:\n\n\u003cdetails open\u003e\u003csummary\u003esettings.gradle.kts\u003c/summary\u003e\n\n```kotlin\npluginManagement {\n    includeBuild(\"path/to/gradle-conventions-plugin\")\n    repositories {\n        google()\n        gradlePluginPortal()\n        mavenCentral()\n    }\n}\n```\n\n\u003c/details\u003e\n\nThe composite build approach provides more flexibility and makes sense when contributing to this plugin.\nIncluding plugins through composite builds works even in settings here the Kotlin Gradle plugin would otherwise fail to\nhandle\ncomposite builds correctly (such as, when depending on a multiplatform library in an Android project).\nNote that applying the Kotlin 1.9.10 version requires setting a system property to prevent name shadowing as shown in\nthe snippet above.\nThe Plugin version targeting Kotlin 1.9.20+ does not require settings the system property.\n\n### Adding the plugin's maven repository\n\nThis plugin is directly published as a maven repository to GitHub (this repo, branch `mvn`).\nTo make this plugin available for your projects, simply add the following to your root project's `settings.gradle.kts`:\n\n```kotlin\npluginManagement {\n    repositories {\n        maven {\n            url = uri(\"https://raw.githubusercontent.com/a-sit-plus/gradle-conventions-plugin/mvn/repo\")\n            name = \"aspConventions\"\n        }\n        mavenCentral()\n        gradlePluginPortal()\n    }\n}\n```\n\nNote that it is important to (at least) add `gradlePluginPortal()`. Otherwise, **no plugins at all** can be resolved!\n\n## Applying the plugin\n\nBefore being able to add this plugin to your project's modules, add it to your Gradle root project as shown\nbelow.\n\n\u003cdetails open\u003e\u003csummary\u003ebuild.gradle.kts\u003c/summary\u003e\n\n```kotlin\nplugins {\n    kotlin(\"jvm\") version \"\u003ckotlin version here\u003e\" apply false //or multiplatform\n    id(\"de.infix.testBalloon\") version \"\u003ckotlin version here\u003e\" apply false //if you want to keep plugin and extensions in sync\n    id(\"at.asitplus.gradle.conventions\") version \"$version\" //Version can be omitted for composite build\n}\n```\n\n\u003c/details\u003e\n\nVersions of various Kotlin plugins will then be managed by this conventions plugin for each module the plugin is applied\nto.\nThe plugin's version corresponds to the Kotlin version provided by this plugin, while the timestamp simply indicates the\nbuild date.\n\nThe logic behind this scheme is rooted in the fact that it manages more than just the Kotlin version. Hence, updates to\nother dependencies need to be captured as well.\nA full list of all plugin and dependency versions can be found\nin [versions.properties](src/main/resources/versions.properties).\nAccess to all declared versions inside a Gradle module is possible through\nthe [AspVersions](src/main/kotlin/AspVersions.kt) object.\n\u003cbr\u003e\n**Please refer to the [changelog](CHANGELOG.md) for detailed version information on each build of this plugin.**\n\n### Multiplatform\n\nConfiguring a multiplatform module relying on serialization and dokka, for example, can be achieved by the\nfollowing `plugins` block:\n\n```kotlin\nplugins {\n    kotlin(\"multiplatform\")\n    kotlin(\"plugin.serialization\") version \"\u003cmatch kotlin version\u003e\" //or add it to the root project with apply(false)\n    id(\"org.jetbrains.dokka\")\n    id(\"io.ktor.plugin\")\n    id(\"at.asitplus.gradle.conventions\")\n}\n```\n\n### JVM-Only\n\nThe same approach show before also works for jvm-only projects:\n\n```kotlin\nplugins {\n    kotlin(\"jvm\")\n    kotlin(\"plugin.serialization\") version \"\u003cmatch kotlin version\u003e\" //or add it to the root project with apply(false)\n    id(\"org.jetbrains.dokka\")\n    id(\"at.asitplus.gradle.conventions\")\n}\n```\n\n\n### Usage with other Kotlin Plugins\n\nAlthough adding this plugin to the root project completely removes the need to manage Kotlin plugin versions in the\nmodules, it does\ncome with a caveat:\nOnly the following Gradle plugins are directly supported with implicit versions:\n\n* ~~Kotlin~~\n    * ~~multiplatform~~\n    * ~~jvm~~\n    * ~~serialization~~\n* Ktor\n* ~~Kotest~~\n* Dokka\n* Nexus publishing\n\nIf, for example, you rely on other plugins, which must be in sync with the Kotlin version used by your project, you need\nto identify the plugin's artefact coordinates.\nYou can usually obtain a plugin's coordinates through the Gradle plugin portal by search for it, and then checking the\n\"legacy\" way of adding plugins.\n\nIf you rely on `kotlin(\"plugin.spring\")` and `kotlin(\"plugin.jpa\")` as typical for a Spring + hibernate webservice, add\nthe following to your **root project's** `build.gradle.kts`:\n\n```kotlin\nbuildscript {\n    dependencies {\n        classpath(\"org.jetbrains.kotlin:kotlin-allopen\") //Spring\n        classpath(\"org.jetbrains.kotlin:kotlin-noarg\") //JPA\n    }\n\n}\n```\n\nYou can then simply add `kotlin(\"plugin.spring\")` and `kotlin(\"plugin.jpa\")` to your module's `plugins` block and the\nversion will be in sync with the core Kotlin Gradle plugin.\nThe reason why you cannot access `AspVersions.kotlin` inside the plugins-block to have it match the Kotlin version is\nthat this property is not a compile-time constant.\n\n## Extensions and Shorthands\n\nCommon compiler options (opt-ins for serialization, coroutines, datetime, and `RequiresOptIn`) are applied\nby default\nIn addition, shorthand for dependencies and other extensions are available to streamline project setup.\n\n### Return Value Checker\nDefaults to `check`, can be overridden by setting `returnValueChecker` property either in `gradle.properties` or `local.properties`.\n\n### JDK Version Management and Android Targets\n\n`jvmToolchain(17)`, `jvmTarget = 17`, and `jdkName = 17` are applied by default, **unless**\n`jdk.version` (either in `gradle.properties` or `local.properties`) is set.\nThe JVM target in use is accessible inside gradle build scripts as `jvmTarget`.\n\nIn addition, Android targets use a different JDK version. To publish for Android:\n  * Add the AGP to your project\n  * Set `android.minSdk` (either in `gradle.properties` or `local.properties`)\n  * Set `android.compileSdk` (either in `gradle.properties` or `local.properties`)\n  * Add at least one `androidTaget` and configure at least one variant to publish\n  * Configure the toplevel `android` block (minSdk, and compileSdk can be omitted, as they are read from properties)\n  * Once this is done\n    * A shared `androidJvmMain` source set automagically available to Android and JVM targets\n    * The JVM target is compiled using `jdk.version`\n    * The Android targets will be using the JDK version matching `android.minSdk` (can be overridden by `android.jvmTarget`)\n  * **The `jvmToolchain` will always be set to `jdk.version`**\n\n### Dependency Shorthands\n\nThe following shorthands are available to declare dependencies:\n\n* `kotest(module: String, target: String? = null)`, where module is something like `datatest`, dor example and target\n  can be blank for multiplatform or `jvm` to target the JVM.\n  \u003cbr\u003eNote that the following kotest modules are available by default, and require no separate declaration:\n    * `kotest-assertions-core`\n    * `kotest-common`\n    * `kotest-property`\n    * `kotest-framework-engine`\n    * `kotest-framework-datatest`\n* `serialization(format: String, target: String? = null)` declares a dependency for kotlinx-serialization\n  format `format` (i.e. `json`, `cbor`, …) to target `target` (leave blank for multiplatform)\n* `ktor(module: String, target: String? = null)` declares a dependency to a ktor module `module` for target `target` (\n  leave blank for multiplatform)\n* `coroutines(target: String? = null)` declares a dependency to kotlinx.coroutines-core for target `target`\n* `napier(target: String? = null)` declares a dependency to Napier\n* `datetime` declares a dependency to kotlinx.datetime\n* `kmmresult` declares a dependency to [KmmResult](https://github.com/a-sit-plus/kmmresult)\n* `bouncycastle(module: String, classifier: String = \"jdk18on\")` declares a dependency to a bouncy castle module (\n  e.g. `bcpkix`) with classifier `classifier` (e.g. `jdk18on`) (JVM-only!)\n\nAny of them can as regular dependency declarations would be. Version declarations are not possible, since all versions\nare managed by this plugin.\nFhe following two examples illustrates valid dependency declarations for multiplatform and JVM-only respectively.\n\n```kotlin\n//mutliplatform example\nkotlin {\n    jvm()\n    iosArm64()\n\n    sourceSets {\n        /* Main source sets */\n        commonMain {\n            dependencies {\n                api(serialization(\"cbor\"))\n                api(ktor(\"client-core\"))\n                api(ktor(\"client-logging\"))\n                api(ktor(\"client-serialization\"))\n                api(ktor(\"client-content-negotiation\"))\n                api(ktor(\"serialization-kotlinx-json\"))\n            }\n        }\n\n        iosMain {\n            dependencies {\n                api(ktor(\"client-darwin\"))\n            }\n        }\n\n        jvmMain {\n            dependencies {\n                api(bouncycastle(\"bcpkix\"))\n                api(ktor(\"client-okhttp\"))\n            }\n        }\n    }\n}\n```\n\n```kotlin\n//JVM example\ndependencies {\n    testImplementation(ktor(\"client-java\"))\n}\n```\n\n### Version Catalog Support\n\nThe versions of all dependencies available through shorthands are set by this plugin. However, version overrides of all\nregular (i.e. non-plugin) dependencies are possible as part of the default version catalog (must be located\nat `gradle/libs.versions.toml`).\nCurrently only string representations of versions are supported (i.e. \"1.0.0\", \"(1.0.0,2.0.0[!!1.5.2\").\n\n**NOTE:** When adding published version catalogs through `settings.gradle.kts` be sure to *never* name them `libs`, since this will result in a name clash!\n\n\nIn addition, a version catalog publication is added to projects using the classifier `versionCatalog`.\n(Due to a limitation in the KMP plugin, it is impossible to add the version catalog variant to the common publication.)\nThis version catalog consists of everything declared in `gradle/libs.versions.toml` plus,\nwhenever a dependency shorthand is called, this dependency is automatically added to the compiled catalog.\nFinally, any non-test dependency declared in a build script is added too.\n\nThis strategy ensures that a complete version catalog is added to the maven publication of every project utilising this\nplugin.\n\n### Building iOS Framework\n\nThis plugin adds a shorthand for building iOS frameworks form multiplatform projects.\nIt is applied to all Kotlin/Native targets whose name starts with `ios`.\nHence, it must be called after ios targets have been configured inside the `kotlin` block.\n\nInvoke `exportIosFramework(name: String, vararg additionalExport: Any)` in your module's build script as\nillustrated by the example below to export an XCode framework:\n\n```kotlin\nplugins {\n    kotlin(\"multiplatform\")\n    kotlin(\"plugin.serialization\") version \"\u003cmatch kotlin version\u003e\"\n    id(\"at.asitplus.gradle.conventions\")\n}\n\nkotlin {\n    jvm()\n    iosArm64()\n    iosX64()\n    iosSimulatorArm64()\n    //other kotlin multiplatform plugin config (dependencies, targets, etc\n}\n\nexportXCFramework(\n    \"MyAwesomeCustomVcFramework\", //name of the resulting framework\n    transitiveExports= false, //do not automatically export all transitive dependencies\n    static = true, //Defaults to false\n    additionalExports= arrayOf( //since we don't automatically export everything transitively\n      \"at.asitplus:kmmresult:1.5.1\", //with KMM result goodness\n      \"at.asitplus.wallet:vclib-openid:2.0.0\", //and (in our opinion) the best KMM VC library ever built)\n      datetime(), //and KMM datetime awesomeness (version managed by conventions plugin)\n      napier() // and elegant KMM-powered logging (version managed by conventions plugin)\n    )\n)\n\n//whatever else needs to be configured\n```\n\n### Dokka Setup Shorthands\n\nA shorthand to setup dokka is available as `setupDokka` which takes the following parameters:\n\n* `outputDir` defaults to `\"$buildDir/dokka\"`\n* `baseUrl` of the remote repository to configure source links\n* `multiModuleDoc` to indicate whether multi-module documentation needs to be configured (defaults to `false`)\n* `remoteLineSuffix` as per Dokka the manual; defaults to `#L`\n\n### GitLab Repository Shorthands\n\nIn addition to GitHub, we use two GitLab instances for hosting various stuff internally.\nThis plugin also provides a shorthand for that, handling HTTP-header-based auth and integrating with GitLab's CI\nrunners.\nThese are called `gitlab()` and `extgit()` respectively and are available for both declaring maven repos for fetching\ndependencies and for publishing.\n\n#### GitLab Dependencies\n\nUse the `gitlab(gitlabGroupId)` or `extgit(extgitGroupId)` shorthands inside a maven repository block as follows:\n\n```kotlin\nrepositories {\n    gitlab(groupId = 42) accessTokenFrom extra\n    //alternatively you can use gitlab(groupId = 1337) withAccessToken \"xPlat-WUMBO_FizzBuzz\"\n    mavenCentral()\n}\n```\n\nThe name of the repository defaults to _gitlab_ or _extgit_, respectively and can be overridden by optionally specifying\nthe `nameOverride` parameter.\n\n#### Publishing to GitLab\n\nPublishing to Gitlab works similarly and assumes this happens from a GitLab CI job. Hence, it requires not access token,\nPublishing local builds in intentionally not supported.\nNote that this time the project id is required, not the group id and that the extension is invoked directly in the\npublishing block:\n\n```kotlin\npublishing {\n    gitLab(projectId = 1337)\n}\n```\n\nAgain, the name of the repository defaults to _gitlab_ or _extgit_, respectively and can be overridden by optionally\nspecifying the `nameOverride` parameter.\n\n## Extending this Plugin\n\nIt is perfectly possible to create a Gradle plugin depending on this one, thus extending its functionality.\nIf, for example, you are developing a large piece of software, consisting of many individual Gradle projects, such that\nit\njustifies the creation of additional conventions based on this plugin,\nsimply add it as a composite build to the new conventions plugin, and you are good to go!\nIn most cases, however, you want to depend on a specific version of this plugin that maps to the Kotlin version you want\nto use.\n\n## Showcase Projects\n\nA sample project, which demonstrates automatic availability of property-based testing using kotest, is\nprovided [here](sample-project).\nIt includes this plugin through its maven repository.\n\nIn addition, thic plugin is also used in the following production projects:\n\n* [VC KMM Library](https://github.com/a-sit-plus/kmm-vc-library) adds this repo as submodule and includes the plugin as\n  part of a compoite build to add a more specialised custom plugin on top\n* [Android Attestation Library](https://github.com/a-sit-plus/android-attestation) uses the prebuilt plugin from the\n  maven repo\n* [Server-Side Mobile Client Attestation Library](https://github.com/a-sit-plus/attestation-service) uses the prebuilt\n  plugin from the maven repo\n\n## Additional Notes\n\nThis Plugin also works with Groovy but is not really tested against it.\n\nSome improvements are already planned:\n\n* Add a default detekt configuration that prevents using inline classes for API function exposed to iOS (e.g.\n  use `KmmResult` instead of `Result` provided by the Kotlin stdlib)\n* Decouple the versions of plugins used to build this plugin from the ones applied when using the plugin in projects.\n\n**Outside Contributions are welcome!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-sit-plus%2Fgradle-conventions-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-sit-plus%2Fgradle-conventions-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-sit-plus%2Fgradle-conventions-plugin/lists"}