How can I ensure that newest version of Gradle resolve all dependencies - spring

I need to update Gradle version in kotlin project. Have I any option to check if all dependencies support new version of Gradle or I need to check all dependencies release nots to make sure.
Actually for me it's not pretty clear how dependencies can't support new version of Gradle.
For instance:

Have I any option to check if all dependencies support new version of Gradle
There two sets of dependencies:
Application dependencies -- https://docs.gradle.org/current/userguide/declaring_dependencies.html
Applications dependencies have no correlation with Gradle whatsoever. These are dependencies needed to build your application and has no impact on Gradle's build environment.
Build dependencies
https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
https://docs.gradle.org/current/userguide/plugins.html
These dependencies, commonly Gradle plugins, do have an impact of your build. Whether or not a plugin supports a version of Gradle is only known by going to the source and checking release notes, if any. If it is not clear if a plugin supports a particular version of Gradle, then your only option is to upgrade your version of Gradle and see if anything breaks.

Related

Gradle is not downloading mapstruct dependencies

I added the dependencies suggested on the mapstruct installation guide but the dependencies are not downloaded and therefore compiler cannot find the annotations.
Here are my dependencies:
Intellij's view for external libraries:
the dependency should appear above the mockito dependency
There are no errors, the project runs perfectly as it is, but I can't use mapstruct.
I have the mapstruct plugin installed
What have I tried so far:
changing mapstruct version
deleting caches
gradle --refresh-dependencies
gradle clean build
and a lot of researching but I couldn't find anything.
I feel like I'm missing something really obvious here, but I can't tell what it is.
Gradle version: 6.6.1

Can't determine why maven is downloading a jar file

I am having an issue with log4j-api. I have specified log4j-api:2.8.1 in my pom but when running a mvn clean install command, mvn keeps insisting that I need log4j-api:2.1. If i delete the log4j-api:2.1 directory from my .m2/repository and do the mvn clean install command, it will say it is downloading the 2.1 version.
Here's the weird thing: If I do a mvn dependency:tree there is no mention of version 2.1, only 2.8.1.
Anybody understand why mvn dependency:tree would say my project is NOT dependent on version 2.1 but then downloads the 2.1 version when I run mvn clean install?
Some other versions we are using in case somebody knows that something could be causing this:
Spring Boot 1.2.1
Spring Framework 4.1.6
Elastic Java APIs 5.6.4
Get the dependency tree in verbose mode
mvn dependency:tree -Dverbose
From maven docs
More specifically, in verbose mode the dependency tree shows dependencies that were omitted for: being a duplicate of another; conflicting with another's version and/or scope; and introducing a cycle into the dependency tree.

Difference between using gradlew and gradle

What is the difference between using gradlew and gradle or are they the same?
The difference lies in the fact that ./gradlew indicates you are using a gradle wrapper. The wrapper is generally part of a project and it facilitates installation of gradle. If you were using gradle without the wrapper you would have to manually install it - for example, on a mac brew install gradle and then invoke gradle using the gradle command. In both cases you are using gradle, but the former is more convenient and ensures version consistency across different machines.
Each Wrapper is tied to a specific version of Gradle, so when you
first run one of the commands above for a given Gradle version, it
will download the corresponding Gradle distribution and use it to
execute the build.
Not only does this mean that you don’t have to manually install Gradle
yourself, but you are also sure to use the version of Gradle that the
build is designed for. This makes your historical builds more reliable
Read more here - https://docs.gradle.org/current/userguide/gradle_wrapper.html
Also, Udacity has a neat, high level video explaining the concept of the gradle wrapper - https://www.youtube.com/watch?v=1aA949H-shk
gradle vs gradlew
gradlew is a wrapper(w - character) that uses gradle.
Under the hood gradlew performs three main things:
Download and install the correct gradle version
Parse the arguments
Call a gradle task
Using Gradle Wrapper we can distribute/share a project to everybody to use the same version and Gradle's functionality(compile, build, install...) even if it has not been installed.
To create a wrapper run:
gradle wrapper
This command generate:
gradle-wrapper.properties will contain the information about the Gradle distribution
*./ Is used on Unix to specify the current directory

Install m2e in eclipse without install maven in system

I recently try to use maven in my eclipse project. In maven official website there are several step that I must to accomplish to configure maven side by side with eclipse. But I know there is a m2eclipse plugins if I need to use maven. But I don't know if I can use this plugins with maven installed in system or not.
So can I use this plugins without maven been installed in system or not ?
The m2e plugin brings a copy of Maven 3.0.4 and installs it inside of Eclipse so the plugin can use it. This is enough to build Maven projects inside of Eclipse. No external installation is needed.
You must start Eclipse with a JDK, though. A JRE isn't enough. If you're unsure: Look for the file lib/tools.jar. When it's there: You're good.
This copy isn't accessible from the command line. If you want to build from the command line as well or if you need a newer version of Maven than 3.0, you need to install Maven and configure the plugin accordingly.

Not specifying Gradle minor version

Using gradle:
Is it possible to set the dependencies such that minor versions are auto upgrading? For instance, I would like gradle to automatically pick the latest guava 11 minor version.
Adding
compile 'com.google.guava:guava:11'
unless of
compile 'com.google.guava:guava:11.0.2'
do not seems to work.
The syntax to use is "11.+" if you want any minor revision above 11.0.0.
If you want for example 11.0.2 but not 11.1.0, you can use "11.0.+".
Using "11+" will probably also find 12.0.0 and above, so would not work as well.
This is mentioned in the Gradle user's guide, where it's referred to as a dynamic version.
Replace it with:
compile 'com.google.guava:guava:11.+

Resources