I would like to publish some common parts of build.gradle file to be reusable in different projects (using apply from: url_to_file
construction). To achieve this I've created a project called gradle-common that contains those common build files, with this build.gradle
file:
group 'org.example'
version '0.1.0'
apply plugin: 'maven-publish'
publishing {
publications {
mavenJava(MavenPublication) {
artifact source: file('files/first.gradle'), classifier: 'first'
}
mavenJava(MavenPublication) {
artifact source: file('files/second.gradle'), classifier: 'second'
}
}
repositories {
mavenLocal()
}
}
Files after publishing in maven repository there are files like:
- gradle-common-0.1.0-first.gradle
- gradle-common-0.1.0-second.gradle
And my question is: how can I remove version number from published artifacts and the classfier? For me ideal files would be:
- first.gradle
- second.gradle