I am beginner with Gradle. I am a Maven user. I have read some blogs and video tutorials from youtube. I want do a complete migration from Maven to Gradle.
I did a research about the following situation without any results.
If Maven within its directory structure has the settings.xml file, where it lets me define the location of my own local repository directory to anywhere, from where any dependency (already downloaded or to be download in the future) is used for any Maven project.
How I can do the same for Gradle?. I have checked the directory structure and there is no a similar file to accomplish this goal.
I have read some tutorials where it reuses the Maven installation. I don’t want this approach. I want configure it directly from Gradle, without Maven installation in the pc/notebook, and in a global way how Maven does.
Is possible this? If yes, could you share the correct instructions? (Blog, tutorial)
what could be the equivalent for gradle to for example define the following location:
/Users/somename/gradlerepository
Two: that Local Repository is the mavenLocal()?
Three: why your current url value and not mavenCentral()?
Four: I want to know if the following is correct:
if I have the project named gradle-01 with the following build.gradle content about the repository
repositories {
mavenLocal()
}
I am assuming Gradle tries to get the dependencies already downloaded in my Local Repository (/Users/somename/gradlerepository) defined globally on the init script file and if a dependency is not found in the Local Repository (is new) then Gradle proceed to call the mavenCentral to try to get the dependency from Maven Central.
Gradle will read this value from the settings.xml so you can continue to store it there. Alternatively you can specify it via the maven.repo.local system property.
Yes.
Just as an example of specifying a Maven repository at a custom location.
Gradle will only try to look in Maven central if mavenCentral() has been explicitly defined in the repositories { } block.
Gradle will read this value from the settings.xml so you can continue to store it there. Alternatively you can specify it via the maven.repo.local system property.
However, remember I want do this Gradle configuration without a Maven installation in the machine.