Hi,
Every new project that we create in our company, has the following publishing.repositories
setting:
publishing {
repositories {
maven {
credentials {
username project.findProperty('nexusUsername')
password project.findProperty('nexusPassword')
}
if (project.version.endsWith('-SNAPSHOT')) {
url 'https://nexus.example.com/content/repositories/snapshots'
} else {
url 'https://nexus.example.com/content/repositories/releases'
}
}
}
}
What is a good way to avoid repeating this over and over again? Using a plugin (e.g. apply plugin: 'exampleNexus'
)?
Thanks in advance.