For uploadArchive task, based on artifact version or release type . It can pick SnapshotURL or ReleaseURL. how to get the deployment URL at runtime. I want to get url in init.gradle ? Please suggest.
uploadArchive {
repositories {
mavenDeployer {
repository(url: ReleaseURL) {
authentication(userName: Username, password: Password)
}
snapshotRepository(url: SnapshotURL ) {
authentication(userName: Username, password: Password)
}
}
}
}
and also how to fetch artifact name, the issue is when you have rootname and basename are different. Artifact is will upload with basename which is defined in jar task…
project.archivesBaseName
project.name
Both give the same result, but baseName set in jar task is different.