2018-10-29 16:32:31 +00:00
---
title: Java Versions
description: Java versions support in Renovate
---
2019-03-08 13:29:00 +00:00
# Java Dependency Updates
2018-10-29 16:32:31 +00:00
2020-12-03 07:32:52 +00:00
Renovate can update Gradle and Maven dependencies.
2020-11-02 08:52:37 +00:00
This includes libraries and plugins.
2018-10-29 16:32:31 +00:00
2019-03-08 13:29:00 +00:00
## Gradle
2018-10-29 16:32:31 +00:00
2020-12-03 07:32:52 +00:00
Renovate detects versions that are specified in a string `'group:artifact:version'` and those specified in a map `(group:groupName, name:ArtifactName, version:Version)` .
2019-03-08 13:29:00 +00:00
2021-03-09 22:21:38 +00:00
### Gradle File Support
2018-10-29 16:32:31 +00:00
2020-12-03 07:32:52 +00:00
Renovate can update `build.gradle` /`build.gradle.kts` files in the root of the repository.
It also updates any `*.gradle` /`*.gradle.kts` files in a subdirectory as multi-project configurations.
2018-10-29 16:32:31 +00:00
Renovate does not support:
2020-12-03 07:32:52 +00:00
- Projects which do not have either a `build.gradle` or `build.gradle.kts` in the repository root
2020-11-06 11:00:57 +00:00
- Android projects that require extra configuration to run (e.g. setting the Android SDK)
2020-02-11 09:25:51 +00:00
- Gradle versions prior to version 5.0.
2018-10-29 16:32:31 +00:00
2019-03-08 13:29:00 +00:00
### How It Works
2020-11-02 08:52:37 +00:00
Renovate uses a plugin to search and extract versions from projects.
2020-12-03 07:32:52 +00:00
Once the Gradle plugin has detected the dependencies, lookups and updating will be performed like usual with datasources and direct patching of files.
2019-03-08 13:29:00 +00:00
## Maven
Renovate can update dependency versions found in Maven `pom.xml` files.
2021-03-09 22:21:38 +00:00
### Maven File Support
2018-10-29 16:32:31 +00:00
2020-12-03 07:32:52 +00:00
Renovate will search repositories for all `pom.xml` files and processes them independently.
2018-10-29 16:32:31 +00:00
2019-03-08 13:29:00 +00:00
### Custom registry support, and authentication
2019-01-13 12:01:00 +00:00
2021-01-08 10:16:46 +00:00
This example shows how you can use a `config.js` file to configure Renovate for use with Artifactory.
We're using environment variables to pass the Artifactory username and password to Renovate bot.
2019-01-13 12:01:00 +00:00
2021-01-08 10:16:46 +00:00
```js
module.exports = {
hostRules: [
2020-12-11 11:30:49 +00:00
{
2021-01-08 10:16:46 +00:00
hostType: 'maven',
2021-05-13 20:53:18 +00:00
matchHost: 'https://artifactory.yourcompany.com/',
2021-01-08 10:16:46 +00:00
username: process.env.ARTIFACTORY_USERNAME,
password: process.env.ARTIFACTORY_PASSWORD,
2020-12-11 11:30:49 +00:00
},
],
2021-01-08 10:16:46 +00:00
};
2019-03-08 13:29:00 +00:00
```