If you work on Android or Backend’s applications, you must configure the gradle.properties
files that can be found in the root folder. This configuration works on remote and local versions.
Follow the steps:
Step 1: Open the file;
Step 2: Change the version name that will be released. Change the VERSION_NAME
variable value to the value you wish.
Besides, you have to add a variable called RELEASE_SIGNING_ENABLED
and attribute it to the false
value. You don’t need to sign a version, once that this configuration allows a Beagle’s version release in local way or to an own repository.
After you finish these configurations, you must have on your gradel the following variables according to the name you chose to your version (on this example, beagle-test
is used):
gradle.properties (root platform)
VERSION_NAME=beagle-test
RELEASE_SIGNING_ENABLED=false
At the end of the gradle.properties
configuration, you have to configure a file that is on Beagle’s root folder, in this case, the maven-publish.gradle
. On this file, add a target that will define:
Keys | Definition |
---|---|
releaseRepositoryUrl | Repository’s URL where the version will be released. |
repositoryUsername | User name. |
repositoryPassword | Password of the declared user name. |
Check out below a publishing example:
maven-publish.gradle (root project)
apply plugin: "com.vanniktech.maven.publish"
def versionName = System.env.VERSION_DEPLOY != null ? System.env.VERSION_DEPLOY : VERSION_NAME ?: ""
version = versionName
mavenPublish {
nexus {
stagingProfile = "br.com.zup"
}
targets {
uploadArchives {
releaseRepositoryUrl = "https://meu-repo.com.br"
repositoryUsername = "username"
repositoryPassword = "password"
}
}
}
At the end of the gradle.properties
configuration, you must run some gradle’s commands:
Go to the root folder on the platform you wish to release the version (Android or Backend);
In the terminal of your preference, run the following command:
gradlew clean build publishToMavenLocal
./gradlew clean build publishToMavenLocal
After you run the command, the version will be automatically released.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.