Feature/improve build (#9)
This commit is contained in:
parent
fe7f336376
commit
d42900afe7
6 changed files with 42 additions and 55 deletions
|
|
@ -8,14 +8,14 @@ plugins {
|
|||
// Apply the java Plugin to add support for Java.
|
||||
id 'java'
|
||||
|
||||
// Git based versioning
|
||||
id 'pl.allegro.tech.build.axion-release'
|
||||
|
||||
// Apply eclipse plugin
|
||||
id 'eclipse'
|
||||
|
||||
// Access to git information
|
||||
id 'org.ajoberstar.grgit'
|
||||
|
||||
// Apply the common versioning conventions.
|
||||
id 'org.jdrupes.vmoperator.versioning-conventions'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,15 @@
|
|||
plugins {
|
||||
// Apply the common convention plugin for shared build configuration between library and application projects.
|
||||
id 'org.jdrupes.vmoperator.java-common-conventions'
|
||||
|
||||
// Apply the common versioning conventions.
|
||||
id 'org.jdrupes.vmoperator.versioning-conventions'
|
||||
|
||||
id 'org.ajoberstar.git-publish'
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Use Maven Central for resolving dependencies.
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
var docDestinationDir = file("${rootProject.buildDir}/javadoc")
|
||||
|
||||
configurations {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* This project uses @Incubating APIs which are subject to change.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
// Required by axion-release
|
||||
id 'org.ajoberstar.grgit'
|
||||
// Git based versioning
|
||||
id 'pl.allegro.tech.build.axion-release'
|
||||
}
|
||||
|
||||
scmVersion {
|
||||
versionIncrementer 'incrementMinor'
|
||||
tag {
|
||||
def shortened = project.name.startsWith(project.group + ".") ?
|
||||
project.name.substring(project.group.length() + 1) : project.name
|
||||
var p = shortened.replace('.', '-') + "-"
|
||||
if (grgit.branch.current.name != "main"
|
||||
&& !grgit.branch.current.name.startsWith("release")) {
|
||||
p = p + grgit.branch.current.name.replace('/', '-') + "-"
|
||||
}
|
||||
prefix = p
|
||||
}
|
||||
}
|
||||
version = scmVersion.version
|
||||
ext.isSnapshot = version.endsWith('-SNAPSHOT')
|
||||
Loading…
Add table
Add a link
Reference in a new issue