{"id":24572978,"url":"https://github.com/vorlonsoft/gradlemavenpush","last_synced_at":"2025-04-23T07:42:46.695Z","repository":{"id":55404171,"uuid":"140856445","full_name":"Vorlonsoft/GradleMavenPush","owner":"Vorlonsoft","description":"Helper to upload Gradle Android Artifacts, Gradle Java Artifacts and Gradle Kotlin Artifacts to Maven repositories (JCenter, Maven Central, Corporate staging/snapshot servers and local Maven repositories).","archived":false,"fork":false,"pushed_at":"2018-10-13T23:49:00.000Z","size":174,"stargazers_count":21,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T22:51:13.520Z","etag":null,"topics":["aar","aar-library","android","android-library","artifact","artifacts","gradle","gradle-build","gradle-java","jar","java","java-library","jcenter","kotlin","kotlin-library","maven","maven-repository","mavencentral","snapshot","staging"],"latest_commit_sha":null,"homepage":"https://vorlonsoft.github.io/GradleMavenPush/","language":"Gradle","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/Vorlonsoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-13T14:25:18.000Z","updated_at":"2024-07-25T15:37:42.000Z","dependencies_parsed_at":"2022-08-14T23:40:12.340Z","dependency_job_id":null,"html_url":"https://github.com/Vorlonsoft/GradleMavenPush","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vorlonsoft%2FGradleMavenPush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vorlonsoft%2FGradleMavenPush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vorlonsoft%2FGradleMavenPush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vorlonsoft%2FGradleMavenPush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vorlonsoft","download_url":"https://codeload.github.com/Vorlonsoft/GradleMavenPush/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250394476,"owners_count":21423360,"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":["aar","aar-library","android","android-library","artifact","artifacts","gradle","gradle-build","gradle-java","jar","java","java-library","jcenter","kotlin","kotlin-library","maven","maven-repository","mavencentral","snapshot","staging"],"created_at":"2025-01-23T19:54:58.548Z","updated_at":"2025-04-23T07:42:46.670Z","avatar_url":"https://github.com/Vorlonsoft.png","language":"Gradle","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GradleMavenPush [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-GradleMavenPush-brightgreen.svg?style=flat)](#) [![Latest Version](https://api.bintray.com/packages/vorlonsoft/VorlonsoftCentral/GradleMavenPush/images/download.svg)](https://github.com/Vorlonsoft/GradleMavenPush/releases)\n\nHelper to upload Gradle Android Artifacts, Gradle Java Artifacts and Gradle Kotlin Artifacts to Maven repositories (JCenter, Maven Central, Corporate staging/snapshot servers and local Maven repositories).\n\n## Contents\n\n* [Usage](#usage)\n  * [1. Have a working Gradle build](#1-have-a-working-gradle-build)\n  * [2. Update your home gradle.properties](#2-update-your-home-gradleproperties)\n  * [3. Create project root gradle.properties](#3-create-project-root-gradleproperties)\n  * [4. Create gradle.properties in each module](#4-create-gradleproperties-in-each-module)\n  * [5. Call the script from each module's build.gradle](#5-call-the-script-from-each-modules-buildgradle)\n  * [6. Build and Deploy/Install](#6-build-and-deployinstall)\n* [Other properties](#other-properties-optional)\n* [Groovydoc documentation](#groovydoc-documentation)\n* [Already in use](#already-in-use-in-following-libraries)\n* [Other plugins](#our-other-plugins)\n* [Contribute](#contribute)\n* [License](#license)\n\n## Usage\n\n### 1. Have a working Gradle build\n\nIt is up to you.\n\n### 2. Update your home gradle.properties\n\nThis will include flag `IS_JCENTER` (default is \"false\" - Maven Central, \"true\" - JCenter), username and password (API Key for JCenter) to upload to the Maven server and so that they are kept local on your machine. The location defaults to `USER_HOME/.gradle/gradle.properties`.\n\nIt may also include your signing key id, password, and secret key ring file (for signed uploads).  Signing is only necessary if you're putting release builds of your project on Maven Central or JCenter.\n\n```properties\nIS_JCENTER                = false\nNEXUS_USERNAME            = vorlonsoft\nNEXUS_PASSWORD            = $tr0ngP@55w0rd\n\nsigning.keyId             = ABCDEF12\nsigning.password          = P@55w0rd\nsigning.secretKeyRingFile = ./secring.gpg\n```\n\n#### 2.1. Alternative, use environment variables (optional)\n\nYou can modify username and password (API Key for JCenter) from environment variables (useful for CI). To use those environment variables on CI just export them:\n\n```properties\nexport NEXUS_USERNAME      = vorlonsoft\nexport NEXUS_PASSWORD      = $tr0ngP@55w0rd\n```\n\n#### 2.2. Other home gradle.properties (optional)\n\nThis will include `JCENTER_USERNAME` (default is `NEXUS_USERNAME` value) and `JCENTER_API_KEY` (default is `NEXUS_PASSWORD` value) to upload to the JCentor. Also you can modify `JCENTER_USERNAME` and `JCENTER_API_KEY` from environment variables (useful for CI).\n\n```properties\nJCENTER_USERNAME          = vorlonsoft\nJCENTER_API_KEY           = $tr0ngJCenter@P!Key\n```\n\n### 3. Create project root gradle.properties\n\nYou may already have this file, in which case just edit the original. This file should contain the properties values which are common to all of your sub-projects (if you have any). For instance, here's [AndroidRate's](https://github.com/Vorlonsoft/AndroidRate):\n\n```properties\n# GROUP (default is packageName for Android projects, \"\" for non-Android)\nGROUP                  = com.vorlonsoft\n# VERSION_NAME (default is build.gradle versionName for Android projects, \"\" for non-Android)\nVERSION_NAME           = 1.2.0-SNAPSHOT\n\nPOM_DESCRIPTION        = Library for Android applications, which provides rating dialog.\nPOM_URL                = https\\://github.com/Vorlonsoft/AndroidRate\nPOM_LICENCE_NAME       = The MIT License (MIT)\nPOM_LICENCE_URL        = https\\://opensource.org/licenses/MIT\nPOM_DEVELOPER_ID       = AlexanderLS\nPOM_DEVELOPER_NAME     = Alexander Savin\nPOM_DEVELOPER_EMAIL    = info@vorlonsoft.com\nPOM_SCM_CONNECTION     = scm\\:git@github.com\\:Vorlonsoft/AndroidRate.git\n```\n\nThe `VERSION_NAME` value is important. If it contains the keyword `SNAPSHOT` then the build will upload to the snapshot server, if not then to the release server.\n\n#### 3.1. Modify the version name from environment variable (optional)\n\nIf there's an environment variable called `VERSION_NAME_EXTRAS`, its value will get appended at the end of `VERSION_NAME`.\nThis can be very powerful when running from CI. For example, to have one SNAPSHOT per branch, you could\n\n```properties\nexport VERSION_NAME_EXTRAS = -master-SNAPSHOT\n```\nin this case it will be uploaded to the snapshot server and indicates it's from the master branch.\n\n### 4. Create gradle.properties in each module\n\nThe values in this file are specific to the sub-project (and override those in the root `gradle.properties`). In this example, this is just the name, artifactId and `JAVADOC_BY_DOKKA` (default is \"false\"):\n\n```properties\nPOM_ARTIFACT_ID  = androidrate\nPOM_NAME         = AndroidRate Library\nJAVADOC_BY_DOKKA = false\n```\n\nSet `JAVADOC_BY_DOKKA` to \"true\" to generate documentation by Dokka. Dokka is a documentation engine for Kotlin, it fully supports mixed-language Java/Kotlin projects.\n\n#### 4.1 Other gradle.properties in each module (optional)\n\nYou can add `POM_PACKAGING` (default is \"aar\" for Gradle Android Artifacts and \"jar\" for Gradle Java Artifacts and Gradle Kotlin Artifacts) and change it's value. Depends on Gradle/Plugins versions this option: 1. Changes `\u003cpackaging\u003e` tag in the generated pom file only; 2. Changes main artifact file extension and `\u003cpackaging\u003e` tag in the generated pom file; 3. Changes main artifact and it's asc file extensions and change `\u003cpackaging\u003e` tag in the generated pom file;\n\nAdd `VAR_ARTIFACT` (default is \"true\") and set it to \"true\" to generate Gradle Android Artifact var. You'll get both `POM_PACKAGING` value (default is \"aar\" for Gradle Android Artifacts) and \"var\" artifacts in your Android library project.\n\nAdd `ANDROID_JAR_ARTIFACT` (default is \"false\") and set it to \"true\" to generate Gradle Android Artifact jar. You'll get both `POM_PACKAGING` value (default is \"aar\" for Gradle Android Artifacts) and \"jar\" artifacts in your Android library project.\n\nAdd `ANDROID_JAR_MAIN_CLASS` (example \"com.vorlonsoft.android.rate.AppRate\", default is \"\") and set it to `${package}.${main-class-name}` to add \"Main-Class\" attribute to Android's \"var\", \"jar\" and \"fatjar\" `MANIFEST.MF` files.\n\nAdd `FATJAR_ARTIFACT` (default is \"false\") and set it to \"true\" to generate fatjar. You'll get both `POM_PACKAGING` value (default is \"aar\" for Gradle Android Artifacts and \"jar\" for Gradle Java Artifacts and Gradle Kotlin Artifacts) and \"fatjar\" artifacts.\n\nAdd `APKLIB_ARTIFACT` (default is \"false\") and set it to \"true\" to generate Gradle Android Artifact apklib. You'll get both `POM_PACKAGING` value (default is \"aar\" for Gradle Android Artifacts) and \"apklib\" artifacts in your Android library project. apklib is a way to bundle an Android library project.\n\nAlso you can set `POM_ARTIFACT_URL` (default is `POM_ARTIFACT_ID` value), this is makes to easier to have an artifact with one artifactId but the name on JCenter something else.\n\n### 5. Call the script from each module's build.gradle\n\nAdd the following at the end of each `build.gradle` that you wish to upload:\n\n```groovy\napply from: 'https://raw.github.com/Vorlonsoft/GradleMavenPush/master/maven-push.gradle'\n```\n\n### 6. Build and Deploy/Install\n\nYou can now build and *deploy* on JCenter, Maven Central or Corporate staging/snapshot servers:\n\n```bash\n$ gradle deployOnServerRepository\n```\n\nBuild and *install* on local Maven (~/.m2/repository/):\n\n```bash\n$ gradle installOnLocalRepository\n```\n\nBuild and *deploy* on local Maven (~/.m2/repository/):\n\n```bash\n$ gradle deployOnLocalRepository\n```\n\n#### 6.1 Inter-module dependency (optional)\n\nIf your modules have dependencies on each other (e.g. implementation project(':other_module')), then you should do one of the following for proper POM generation\n\n- **option A**: add to top level `build.gradle`:\n\n```groovy\nallprojects {\n    group = GROUP\n    version = VERSION_NAME\n}\n```\n\n- **option B**: add to top level `gradle.properties`:\n\n```properties\ngroup   = com.vorlonsoft\nversion = 1.2.0\n```\n\n### Other properties (optional)\n\nThere are other properties which can be set:\n\n#### Repositories urls\n\n```properties\nRELEASE_REPOSITORY_URL (defaults to Maven Central's or JCenter's staging server (depends on IS_JCENTER))\nSNAPSHOT_REPOSITORY_URL (defaults to Maven Central's or JCenter's snapshot server (depends on IS_JCENTER))\n```\n\n#### Javadoc generation\n\n```properties\nDOCLINT_CHECK (default is \"false\")\nJAVADOC_ENCODING (default is \"UTF-8\")\nJAVADOC_DOC_ENCODING (default is \"UTF-8\")\nJAVADOC_CHARSET (default is \"UTF-8\")\n```\n\nJava 9+. This option assume that the HTML in the document comments is of the same version (4 or 5). It doesn't convert the HTML in the user documentation comments to the specified output version.\n\n```properties\nJAVADOC_HTML_VERSION (default is \"4\")\n```\n\n#### Dokka documentation engine\n\nDokka fatjar version. Latest version is [![Dokka fatjar latest version](https://api.bintray.com/packages/kotlin/dokka/dokka/images/download.svg)](#)\n\n```properties\nDOKKA_FATJAR_VERSION (default is \"0.9.17\")\n```\n\nDokka output format. Options are:\n\n  * `html` - minimalistic html format used by default\n  * `javadoc` - Dokka mimic to javadoc\n  * `html-as-java` - as `html` but using java syntax\n  * `markdown` - Markdown structured as `html`\n    * `gfm` - GitHub flavored markdown\n    * `jekyll` - Jekyll compatible markdown\n  * `kotlin-website` - internal format used for documentation on *kotlinlang.org*\n\n```properties\nDOKKA_OUTPUT_FORMAT (default is \"javadoc\")\n```\n\n#### Snapshots names\n\n```properties\nPOM_GENERATE_UNIQUE_SNAPSHOTS (default is \"true\")\n```\n\n#### Project Information\n\n```properties\nPOM_INCEPTION_YEAR (default is \"\")\n```\n\n#### Organization\n\n```properties\nPOM_ORG (default is \"\")\nPOM_ORG_URL (default is \"\")\n```\n\n#### Licenses\n\n```properties\nPOM_LICENCE_DIST (default is \"repo\")\nPOM_LICENCE_COMMENTS (default is \"\")\n```\n\n#### Developers\n\n```properties\nPOM_DEVELOPER_URL (default is \"\")\nPOM_DEVELOPER_ORG (default is POM_ORG value)\nPOM_DEVELOPER_ORG_URL (default is POM_ORG_URL value)\nPOM_DEVELOPER_ROLE (default is \"Software Developer\")\nPOM_DEVELOPER_ROLES (example \"Software Architect,Software Developer\", default is POM_DEVELOPER_ROLE value)\nPOM_DEVELOPER_TIMEZONE (default is \"\")\n```\n\n2nd, 3rd, etc developers, only id, name and email separated by comma.\n\n```properties\nPOM_DEVELOPERS (example \"BillG,Bill Gates,bill@example.com,SteveJ,Steve Jobs,steve@example.com\", default is \"\")\n```\n\n#### Contributors\n\nContributors, only name and email separated by comma.\n\n```properties\nPOM_CONTRIBUTORS (example \"Bill Gates,bill@example.com,Steve Jobs,steve@example.com\", default is \"\")\n```\n\n#### Issue Management\n\n```properties\nPOM_ISSUE_SYSTEM (default is \"\")\nPOM_ISSUE_SYSTEM_URL (default is \"\")\n```\n\n#### Continuous Integration Management\n\n```properties\nPOM_CI_SYSTEM (default is \"\")\nPOM_CI_SYSTEM_URL (default is \"\")\n```\n\n#### Mailing Lists\n\nMailing Lists, only name, subscribe email and unsubscribe email separated by comma.\n\n```properties\nPOM_MAILING_LISTS (example \"Main,s@example.com,u@example.com,Support,ss@example.com,us@example.com\", default is \"\")\n```\n\n#### Software Configuration Management\n\nConnection element convey to how one is to connect to the version control system through Maven.\n\n```properties\nPOM_SCM_DEV_CONNECTION (default is POM_SCM_CONNECTION value)\n```\n\nSpecifies the tag that this project lives under. HEAD (meaning, the SCM root).\n\n```properties\nPOM_SCM_TAG (default is \"HEAD\")\n```\n\nA publicly browsable repository.\n\n```properties\nPOM_SCM_URL (default is POM_URL value)\n```\n\n#### Repositories\n\nRepositories in the Release pom file, only id and url separated by comma.\n\n```properties\nPOM_REPOSITORIES (example \"mavenCentral,https\\://repo1.maven.org/maven2/,jCenter,https\\://jcenter.bintray.com/\", default is \"\")\n```\n\nRepositories in the Snapshot pom file, only id and url separated by comma.\n\n```properties\nPOM_SNAPSHOT_REPOSITORIES (example \"mavenCentral,https\\://oss.sonatype.org/content/repositories/snapshots/,jCenter,https\\://oss.jfrog.org/artifactory/oss-snapshot-local/\", default is POM_REPOSITORIES value)\n```\n\n#### Distribution Management\n\nThis is the url of the repository from whence another POM may point to in order to grab this POM's artifact.\n\n```properties\nPOM_DIST_DOWNLOAD_URL (default is \"\")\n```\n\n## Groovydoc documentation\n\nSee [GradleMavenPush documentation](https://vorlonsoft.github.io/GradleMavenPush/groovydoc/)\n\n## Already in use in following libraries\n\n* [AndroidRate library](https://github.com/Vorlonsoft/AndroidRate)\n\n* [ExpandableSelector library](https://github.com/Karumi/ExpandableSelector)\n\n* ...\n\n## Our other plugins\n\n[EasyDokkaPlugin](https://github.com/Vorlonsoft/EasyDokkaPlugin) - Gradle Script plugin to generate documentation by Dokka documentation engine in Javadoc or other formats for Java, Kotlin, Android and non-Android projects. It's very easy, you don't need to add to `dependencies` section additional `classpath` or think about compatibility issues, you don't need additional repositories also.\n\n## Contribute\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\n\n    Copyright 2018 Vorlonsoft LLC\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        https://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorlonsoft%2Fgradlemavenpush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvorlonsoft%2Fgradlemavenpush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorlonsoft%2Fgradlemavenpush/lists"}